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
A cancelled pipelined prepared statement that hits a cached-plan error never settles #123
Found while reproducing #48. A prepared statement queued behind another on the same connection is cancelled before it starts. When the server then answers it with a cached-plan error (for example after a column type change), ReadyForQuery sends it to retry(), which calls execute(), and submit() returns early because the query is cancelled (src/connection.js). Nothing settles it, so the caller waits forever. The statement queued behind it still gets its own result.
Reproduced against real PostgreSQL on every Node job in CI run 38906039086 (cancelled: 'hung'): warm a prepared read, change the column type, run pg_sleep(0.2) with the read and select 1 queued behind it at max: 1, cancel the read during the sleep.
Fix: don't retry a cancelled query; settle it as cancelled.
Activity
chore: release 4.5.0
okomarov commentedon Oct 17, 2026
Shipped in 4.5.0.