Skip to content

A failed .simple() query with untyped values may resolve the next pipelined query with an empty result #44

Open

Description

@okomarov

Found by reading the code while planning #41; not reproduced yet.

When a query that asked the server for its parameter types fails, the ErrorResponse handler (src/connection.js, around line 1073) writes an extra Sync for it. .simple() queries never ask, but a .simple() query with untyped values is still flagged as asking. If it fails, the extra Sync produces an extra ReadyForQuery, which can complete the next pipelined query on that connection with an empty result instead of its rows.

To confirm: pipeline a failing .simple() query with an untyped value, followed by a normal query, on a max: 1 pool, and check the second query's result. The fake-server harness in tests-startup can show the extra Sync.

#41's first step removes the flag for .simple() queries whose values are all typed, so only untyped values remain affected.

Activity

  1. added
    bug
    on Oct 13, 2026
  2. moved this to Later in Roadmapon Oct 15, 2026
  3. added
    area: protocol
    unverified
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: protocolbugunverified

    Type

    No type

    Projects

    • Status
      Later

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions