Investigating empty reads after a very large transaction on Bun/macOS (0.4.6)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- bun, postgresql, typescript, wasm
- Ambito
- databases
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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?
- Lingua principale
- TypeScript
- Stelle
- 16.3k
- Fork
- 474
- Merge medio
- 23h 53m
- PR unite (30g)
- 53
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di electric-sql/pglite
-
Feature request: Nitro 3 support (`unwasm` export condition)Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
electric-sql/pglite#1120 · 16 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
electric-sql/pglite#1192 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: syncToFs() resolves immediately, without syncing, when another sync is already queuedForse già presa @PrabalParihar l’ha presa 11 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
electric-sql/pglite#1191 ·
I maintainer di solito rispondono entro 1 giorno
-
Feature request: live: allow pausing the notify triggers during bulk writes (e.g. pglite-sync applies) and refresh once on resumeForse già presa @tdrz l’ha presa 13 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
electric-sql/pglite#1184 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
pglite-socket: handleData copies the whole buffer for every chunk (quadratic time for large messages)Forse già presa @benclmnt l’ha presa 10 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
electric-sql/pglite#1181 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di electric-sql/pglite
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
open-webui/tether#52 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
voidzero-dev/void#835 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
AykutSarac/jsoncrack.com#616 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
melgarafael/DeskcommCRM#4679 ·
I maintainer di solito rispondono entro 1 giorno