Investigating empty reads after a very large transaction on Bun/macOS (0.4.6)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- bun, postgresql, typescript, wasm
- 領域
- databases
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- TypeScript
- スター
- 16.3k
- フォーク
- 474
- 平均マージ
- 23時間 53分
- マージ済み PR(30日)
- 53
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
electric-sql/pglite のほかの issue
-
Feature request: Nitro 3 support (`unwasm` export condition)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
electric-sql/pglite#1120 · コメント 16 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
electric-sql/pglite#1192 ·
メンテナーはふだん 1 日以内に返信
-
[BUG]: syncToFs() resolves immediately, without syncing, when another sync is already queued対応中かも @PrabalParihar が 11 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
electric-sql/pglite#1191 ·
メンテナーはふだん 1 日以内に返信
-
Feature request: live: allow pausing the notify triggers during bulk writes (e.g. pglite-sync applies) and refresh once on resume対応中かも @tdrz が 13 日前に担当しました。 オープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
electric-sql/pglite#1184 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
pglite-socket: handleData copies the whole buffer for every chunk (quadratic time for large messages)対応中かも @benclmnt が 10 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
electric-sql/pglite#1181 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
electric-sql/pglite の issue をすべて見る
似ている issue
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hex対応中かも @bardrop が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedオープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
codercops/discord-bot#152 ·
メンテナーはふだん 1 日以内に返信
-
bug i18n
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
endora-commerce/endora-commerce#1315 ·
メンテナーはふだん 1 日以内に返信
-
area:data-quality importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
enorm-labs/event-junkie#5136 ·
メンテナーはふだん 1 日以内に返信
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信