Skip to content

Fix duplicate rows in DeferredChunkAppend with non-constant LIMIT - #10592

Merged
svenklemm merged 1 commit into
mainfrom
sven/dca_limit_fix
Sep 14, 2026
Merged

svenklemm merged 1 commit into
mainfrom
sven/dca_limit_fix

Conversation

@svenklemm

Copy link
Copy Markdown
Member

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

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
@github-actions

Copy link
Copy Markdown

@pnthao, @Poroma-Banerjee: please review this pull request.

Powered by pull-review

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

@svenklemm svenklemm added this to the v2.30.1 milestone Sep 14, 2026
@svenklemm
svenklemm merged commit 18b3430 into main Sep 14, 2026
70 of 72 checks passed
@svenklemm
svenklemm deleted the sven/dca_limit_fix branch September 14, 2026 12:56
@philkra philkra mentioned this pull request Sep 16, 2026
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)
@timescale-automation timescale-automation added the released-2.30.1 Released in 2.30.1 label Sep 17, 2026
@timescale-automation timescale-automation added the released-2.31.0 Released in 2.31.0 label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-2.30.x released-2.30.1 Released in 2.30.1 released-2.31.0 Released in 2.31.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LIMIT query on a hypertable returns duplicate rows once the plan goes generic (regression in 2.30.0)

4 participants