Repository navigation
Fix duplicate rows in DeferredChunkAppend with non-constant LIMIT - #10592
Merged
Merged
Conversation
When the LIMIT is not a constant and cannot be pushed into the per-chunk query, such as a prepared statement with a parameterized LIMIT once it switches to a generic plan, DeferredChunkAppend would repeat tuples from the same chunk as it would restart the scan. Fixes #10584
|
@pnthao, @Poroma-Banerjee: please review this pull request.
|
Codecov Reportβ All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
antekresic
approved these changes
Sep 14, 2026
natalya-aksman
approved these changes
Sep 14, 2026
Merged
surister
pushed a commit
that referenced
this pull request
Sep 17, 2026
## 2.30.1 (2026-09-17) This release contains bug fixes since the 2.30.0 release. We recommend that you upgrade at the next available opportunity. **Bugfixes** * [#10580](#10580) Fix missing conflicts for `INSERT ... ON CONFLICT` with multiple unique constraints * [#10583](#10583) Fix `NULL` conflict resolution on single-column bloom filtering * [#10592](#10592) Fix duplicate rows from `DeferredChunkAppend` when `LIMIT` is not pushed down * [#10593](#10593) Fix `cannot cast type cstring` error in `DeferredChunkAppend` queries **Thanks** * @davidecentioni for reporting the problem with a LIMIT query on a hypertable returning duplicate rows once the plan goes generic [#10584](#10584) * @vincentrolfs for reporting the problem of LIMIT query with enum columns and casting [#10590](#10590)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the LIMIT is not a constant and cannot be pushed into the per-chunk
query, such as a prepared statement with a parameterized LIMIT once it
switches to a generic plan, DeferredChunkAppend would repeat tuples from
the same chunk as it would restart the scan.
Fixes #10584