From: murex971 (@murex971) <noreply+murex971@github.com>
To: pgdogdev/pgdog <noreply+pgdogdev-pgdog@github.com>
Subject: [pgdogdev/pgdog] issue #2043: Cached query plans causing wrong results with OFFSET
Date: Sun, 15 Nov 2026 18:50:00 +0000
Message-ID: <gh-pgdogdev-pgdog-2043@github.com> (raw)
**PgDog version**
`main`
**Description**
PgDog caches prepared statements by SQL text only.
If the same query runs first on an unsharded database and then on a sharded one, the sharded
database reuses the unsharded plan. Each shard then applies OFFSET, and PgDog applies it again
after merging. Rows get skipped, with no error.