Investigating empty reads after a very large transaction on Bun/macOS (0.4.6)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- bun, postgresql, typescript, wasm
- Área
- databases
Línea de trabajo
The issue does not identify a PGlite source file, test, or entry point, and it has no minimal standalone reproduction. Start by investigating how to reproduce empty reads after a large transaction, then capture diagnostics that distinguish engine results from driver parsing or application transaction misuse. Done means the failure is isolated with evidence; the issue currently asks for diagnostic direction rather than defining a fix.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
We are investigating an observed failure after a very large PGlite transaction in Prompt Studio. We have bounded and made the application migration resumable, but have not isolated the subsequent empty reads to PGlite itself. Is this a known failure mode, or is there a useful diagnostic build/trace to capture next?
Environment: macOS arm64, Bun, @electric-sql/pglite 0.4.6, Drizzle 0.45.2. Application source: https://github.com/pufflyai/prompt-studio/pull/1776 (ordered storage host). The incident occurred on the 2026-11-07 nightly host, after upgrading a legacy database.
Observed workload:
- 66,129 legacy records for one owner, including 51,437 tombstones.
- 84,669 pending legacy frames, about 110 MB, retained locally.
- Approximately 977,000 SQL statements in one outer transaction. Owners used nested savepoints; no transaction was committed between migration pages.
- Roughly 100% of one CPU core, RSS up to 6.4 GB, 373–614 seconds. PGlite's immediately resolved query promises kept the application's macrotask queue from running during the chain.
Last statements reported by the trace, after one owner savepoint was released:
SAVEPOINT sp1;
SELECT id FROM projects WHERE id = $1 FOR UPDATE;
INSERT INTO storage_documents (...) VALUES (...) ON CONFLICT DO NOTHING;
INSERT INTO storage_record_projections (...) VALUES (...) ON CONFLICT DO NOTHING;
SELECT revision FROM storage_record_projections
WHERE workbench_id = $1 AND extension_id = $2 FOR UPDATE;
-- Application received no row, then threw while reading row.revision.
ROLLBACK TO SAVEPOINT sp1;
ROLLBACK;
After rollback, queries for the existing projects in the same process/instance also returned no rows: the projects endpoint returned []. A fresh process opening the same database files read all 11 projects. Restarting with the old migration repeated the long transaction and failure. No PostgreSQL SQL error before the empty result was captured.
Control on a backup: removing the 90,297 legacy outbox rows across the project let conversion finish in about 30 seconds (~130,000 statements); project reads then worked. This changes the transaction workload, so it does not establish a PGlite bug or rule out application/concurrency/driver behavior.
The original affected database contains private user content and is not attached. A synthetic application fixture with 60,000 records (48,000 tombstones) and 80,000 pending frames completes after our batching change and preserves project reads, but does not reproduce the post-transaction empty reads. We have not yet produced a minimal standalone SQL reproduction. We are preserving this distinction rather than claiming a demonstrated engine corruption.
Would engine/driver memory growth, nested savepoint bookkeeping, or an invalidated result buffer be useful areas to instrument? What diagnostics would distinguish an engine result from driver parsing or application transaction misuse after such a workload?
- Lenguaje dominante
- TypeScript
- Estrellas
- 16.3k
- Forks
- 474
- Merge medio
- 23 h 53 min
- PR fusionados (30 d)
- 53
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de electric-sql/pglite
-
Feature request: Nitro 3 support (`unwasm` export condition)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
electric-sql/pglite#1120 · 16 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
electric-sql/pglite#1192 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: syncToFs() resolves immediately, without syncing, when another sync is already queuedPosiblemente ocupada @PrabalParihar la tomó hace 11 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
electric-sql/pglite#1191 ·
Los mantenedores suelen responder en 1 día
-
Feature request: live: allow pausing the notify triggers during bulk writes (e.g. pglite-sync applies) and refresh once on resumePosiblemente ocupada @tdrz la tomó hace 13 días. Abiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
electric-sql/pglite#1184 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
pglite-socket: handleData copies the whole buffer for every chunk (quadratic time for large messages)Posiblemente ocupada @benclmnt la tomó hace 10 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
electric-sql/pglite#1181 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de electric-sql/pglite
Issues similares
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPosiblemente ocupada @bardrop la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedAbiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
codercops/discord-bot#152 ·
Los mantenedores suelen responder en 1 día
-
bug i18n
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
endora-commerce/endora-commerce#1315 ·
Los mantenedores suelen responder en 1 día
-
Two stored artist rows are not act names: "DJS" from a Renate floor heading and "Stevie Cox -"Abiertoarea:data-quality importer size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
enorm-labs/event-junkie#5136 ·
Los mantenedores suelen responder en 1 día
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día