You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pg 8.23.0 (compiled from source): first parameterized query segfaults; plain queries work #11459
Found by the Phase 1 package benchmark harness (benchmarks/packages/pg/{select,insert_batch}.ts, branch wip/pkg-bench-phase1). Reproduces on main 36420d2e56 (Linux x86-64, PostgreSQL 16, pg 8.23.0 compiled from source — the native binding is gone, so #10330 is about different code).
The first parameterized query segfaults; a plain query on the same connection works:
// npm i pg@8.23.0importpgfrom"pg";constc=newpg.Client({host: "127.0.0.1",port: 55432,user: "bench",database: "bench"});console.log("connecting");awaitc.connect();console.log("connected");constr=awaitc.query("SELECT 1 AS n");console.log("plain:",r.rows[0].n);constr2=awaitc.query("SELECT $1::int + 1 AS n",[41]);console.log("param:",r2.rows[0].n);awaitc.end();console.log("end");
Parameterized queries go through pg's extended protocol (Parse/Bind/Describe/Execute, built by pg-protocol's Writer/serializer into a growing Buffer), which the plain query never touches, so the crash is somewhere in that path. #11335 (grown array written back through its box, which fixed the mysql2 segfault) is already on this main and does not cover it. Both benchmark workloads (pg/select, pg/insert_batch) die the same way.
Likely a duplicate of #11430 (pg parameterized query segfaults in js_buffer_write_len on the main thread). An agent has a fix in progress there; verify after it lands.
Closing as a duplicate of #11430 (same pg 8.23.0 parameterized-query segfault in js_buffer_write_len / Writer.addInt32PrefixedString). #11430 was fixed by #11468 (merged 2026-09-27), which reports the SELECT $1::int * 3 probe going from 0/20 to 20/20. Please reopen if this still reproduces on current main.
Activity
proggeramlug commentedon Sep 27, 2026
Likely a duplicate of #11430 (pg parameterized query segfaults in js_buffer_write_len on the main thread). An agent has a fix in progress there; verify after it lands.
TheHypnoo commentedon Sep 28, 2026
Closing as a duplicate of #11430 (same pg 8.23.0 parameterized-query segfault in
js_buffer_write_len/Writer.addInt32PrefixedString). #11430 was fixed by #11468 (merged 2026-09-27), which reports theSELECT $1::int * 3probe going from 0/20 to 20/20. Please reopen if this still reproduces on current main.