Skip to content

Fix RLS checks after dropping hypertable columns - #10515

Merged
svenklemm merged 1 commit into
mainfrom
sven/rls_attmap
Aug 31, 2026
Merged

svenklemm merged 1 commit into
mainfrom
sven/rls_attmap

Conversation

@svenklemm

Copy link
Copy Markdown
Member

Properly remap WCOs to chunk-local state when it differs from
hypertable layout.

Fixes: #10136

@svenklemm svenklemm added this to the v2.30.0 milestone Aug 31, 2026
@github-actions
github-actions Bot requested review from akuzm and pnthao August 31, 2026 08:01
@github-actions

Copy link
Copy Markdown

@akuzm, @pnthao: please review this pull request.

Powered by pull-review

@svenklemm svenklemm added the llm-fuzzer Issue found by llm-fuzzer label Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Codecov Report

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

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

@akuzm akuzm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's spell "WITH CHECK options" in the commit message, WCO is not a standard abbreviation.

Properly remap WITH CHECK options to chunk-local state when it differs
from hypertable layout.

Fixes: #10136
@svenklemm
svenklemm merged commit 0770190 into main Aug 31, 2026
62 of 63 checks passed
@svenklemm
svenklemm deleted the sven/rls_attmap branch August 31, 2026 19:42
This was referenced Sep 2, 2026
svenklemm pushed a commit that referenced this pull request Sep 8, 2026
This release contains performance improvements and bug fixes since the 2.29.2 release. We recommend that you upgrade at the next available opportunity.

**Highlighted features in TimescaleDB v2.30.0**
Blazing fast `LIMIT` queries with the newly introduced `DeferredChunkAppend`. This custom node reduces planning significantly by delaying chunk expansion. During planning the hypertable stays unexpanded and only during execution are chunks enumerated on demand. Combined with the optimizations to `FIRST` and `LAST` sparse indexes, this addition executes last-point queries far more efficiently and quickly.  This changes the scaling of the "What is the last reading from this sensor" query from linear with number of chunks to constant if it can be found in the most recent chunk. The true power of the custom node starts to show with increasing amount of chunks, see [more elaborate benchmarks](#10292).

**Features**
* [#10147](#10147) Support segmentwise batch sorted merge for overlapping batches
* [#10292](#10292) Add `DeferredChunkAppend` custom scan
* [#10354](#10354) Adds DML support for concurrent compaction
* [#10388](#10388) Add custom toaster for compression

**Bugfixes**
* [#10058](#10058) Apply new sortkeys for in-memory recompression
* [#10128](#10128) Include hypertable chunks in publications created with `FOR TABLES IN SCHEMA`
* [#10325](#10325) Avoid test errors when building from a source archive without a git repository
* [#10408](#10408) Verify columns and their types in `create_compressed_chunk`
* [#10515](#10515) Fix row level security checks after dropping hypertable columns
* [#9905](#9905) Potentially incorrect result of a join when the join clause contains `time_bucket`
* [#9920](#9920) Fix the "XX000: failed to evaluate runtime constant in vectorized filter" error in some queries that use stable functions in `WHERE` clause and the columnar aggregation pipeline
* [#10499](#10499) Potentially wrong query result when hypertable chunks are filtered out at query run time, the filter condition uses an uncorrelated subquery, and the query uses a parallel execution plan
* [#10513](#10513) Remove `user_catalog_table` option from catalog tables
* [#10506](#10506) Correctly match `NULL` tuples to compressed batches with `NULL` boundaries during recompression
* [#10524](#10524) Shared memory leak in the chunk stats subsystem when databases are dropped
* [#10535](#10535) Fix chunk merging with default sparse indexes
* [#10536](#10536) Skip batch size check when direct compress is set as hypertable option
* [#10539](#10539) Allow deletes from the policy chunk stats table when the database publishes all tables

**GUCs**
* `enable_deferred_chunk_append`: Custom scan node for hypertables that iterates chunks at execution instead of expanding every chunk at plan time. Default: true.
* `use_custom_toaster`: Use a custom TOAST writer for compressed row inserts. Default: false.

**Thanks**
* @tureba for reporting the problem with building from a source archive without a git repository [#10325](#10325)
* @AlexFavre for reporting a failed extension update when a publication for all tables exists [#10477](#10477)
* @peterecofit for reporting potentially wrong query result when hypertable chunks are filtered out at query run time [#10503](#10503)
* @esdanieljaegers for reporting the issue and providing steps for reproduction [#10511](#10511)
svenklemm added a commit that referenced this pull request Sep 8, 2026
This release contains performance improvements and bug fixes since the 2.29.2 release. We recommend that you upgrade at the next available opportunity.

**Highlighted features in TimescaleDB v2.30.0**
Blazing fast `LIMIT` queries with the newly introduced `DeferredChunkAppend`. This custom node reduces planning significantly by delaying chunk expansion. During planning the hypertable stays unexpanded and only during execution are chunks enumerated on demand. Combined with the optimizations to `FIRST` and `LAST` sparse indexes, this addition executes last-point queries far more efficiently and quickly.  This changes the scaling of the "What is the last reading from this sensor" query from linear with number of chunks to constant if it can be found in the most recent chunk. The true power of the custom node starts to show with increasing amount of chunks, see [more elaborate benchmarks](#10292).

**Features**
* [#10147](#10147) Support segmentwise batch sorted merge for overlapping batches
* [#10292](#10292) Add `DeferredChunkAppend` custom scan
* [#10354](#10354) Adds DML support for concurrent compaction
* [#10388](#10388) Add custom toaster for compression

**Bugfixes**
* [#10058](#10058) Apply new sortkeys for in-memory recompression
* [#10128](#10128) Include hypertable chunks in publications created with `FOR TABLES IN SCHEMA`
* [#10325](#10325) Avoid test errors when building from a source archive without a git repository
* [#10408](#10408) Verify columns and their types in `create_compressed_chunk`
* [#10515](#10515) Fix row level security checks after dropping hypertable columns
* [#9905](#9905) Potentially incorrect result of a join when the join clause contains `time_bucket`
* [#9920](#9920) Fix the "XX000: failed to evaluate runtime constant in vectorized filter" error in some queries that use stable functions in `WHERE` clause and the columnar aggregation pipeline
* [#10499](#10499) Potentially wrong query result when hypertable chunks are filtered out at query run time, the filter condition uses an uncorrelated subquery, and the query uses a parallel execution plan
* [#10513](#10513) Remove `user_catalog_table` option from catalog tables
* [#10506](#10506) Correctly match `NULL` tuples to compressed batches with `NULL` boundaries during recompression
* [#10524](#10524) Shared memory leak in the chunk stats subsystem when databases are dropped
* [#10535](#10535) Fix chunk merging with default sparse indexes
* [#10536](#10536) Skip batch size check when direct compress is set as hypertable option
* [#10539](#10539) Allow deletes from the policy chunk stats table when the database publishes all tables

**GUCs**
* `enable_deferred_chunk_append`: Custom scan node for hypertables that iterates chunks at execution instead of expanding every chunk at plan time. Default: true.
* `use_custom_toaster`: Use a custom TOAST writer for compressed row inserts. Default: false.

**Thanks**
* @tureba for reporting the problem with building from a source archive without a git repository [#10325](#10325)
* @AlexFavre for reporting a failed extension update when a publication for all tables exists [#10477](#10477)
* @peterecofit for reporting potentially wrong query result when hypertable chunks are filtered out at query run time [#10503](#10503)
* @esdanieljaegers for reporting the issue and providing steps for reproduction [#10511](#10511)
svenklemm added a commit that referenced this pull request Sep 8, 2026
This release contains performance improvements and bug fixes since the 2.29.2 release. We recommend that you upgrade at the next available opportunity.

**Highlighted features in TimescaleDB v2.30.0**
Blazing fast `LIMIT` queries with the newly introduced `DeferredChunkAppend`. This custom node reduces planning significantly by delaying chunk expansion. During planning the hypertable stays unexpanded and only during execution are chunks enumerated on demand. Combined with the optimizations to `FIRST` and `LAST` sparse indexes, this addition executes last-point queries far more efficiently and quickly.  This changes the scaling of the "What is the last reading from this sensor" query from linear with number of chunks to constant if it can be found in the most recent chunk. The true power of the custom node starts to show with increasing amount of chunks, see [more elaborate benchmarks](#10292).

**Features**
* [#10147](#10147) Support segmentwise batch sorted merge for overlapping batches
* [#10292](#10292) Add `DeferredChunkAppend` custom scan
* [#10354](#10354) Adds DML support for concurrent compaction
* [#10388](#10388) Add custom toaster for compression

**Bugfixes**
* [#10058](#10058) Apply new sortkeys for in-memory recompression
* [#10128](#10128) Include hypertable chunks in publications created with `FOR TABLES IN SCHEMA`
* [#10325](#10325) Avoid test errors when building from a source archive without a git repository
* [#10408](#10408) Verify columns and their types in `create_compressed_chunk`
* [#10515](#10515) Fix row level security checks after dropping hypertable columns
* [#9905](#9905) Potentially incorrect result of a join when the join clause contains `time_bucket`
* [#9920](#9920) Fix the "XX000: failed to evaluate runtime constant in vectorized filter" error in some queries that use stable functions in `WHERE` clause and the columnar aggregation pipeline
* [#10499](#10499) Potentially wrong query result when hypertable chunks are filtered out at query run time, the filter condition uses an uncorrelated subquery, and the query uses a parallel execution plan
* [#10513](#10513) Remove `user_catalog_table` option from catalog tables
* [#10506](#10506) Correctly match `NULL` tuples to compressed batches with `NULL` boundaries during recompression
* [#10524](#10524) Shared memory leak in the chunk stats subsystem when databases are dropped
* [#10535](#10535) Fix chunk merging with default sparse indexes
* [#10536](#10536) Skip batch size check when direct compress is set as hypertable option
* [#10539](#10539) Allow deletes from the policy chunk stats table when the database publishes all tables

**GUCs**
* `enable_deferred_chunk_append`: Custom scan node for hypertables that iterates chunks at execution instead of expanding every chunk at plan time. Default: true.
* `use_custom_toaster`: Use a custom TOAST writer for compressed row inserts. Default: false.

**Thanks**
* @tureba for reporting the problem with building from a source archive without a git repository [#10325](#10325)
* @AlexFavre for reporting a failed extension update when a publication for all tables exists [#10477](#10477)
* @peterecofit for reporting potentially wrong query result when hypertable chunks are filtered out at query run time [#10503](#10503)
* @esdanieljaegers for reporting the issue and providing steps for reproduction [#10511](#10511)
@timescale-automation timescale-automation added the released-2.30.0 Released in 2.30.0 label Sep 8, 2026
@svenklemm svenklemm mentioned this pull request Sep 8, 2026
svenklemm added a commit that referenced this pull request Sep 8, 2026
This release contains performance improvements and bug fixes since the 2.29.2 release. We recommend that you upgrade at the next available opportunity.

**Highlighted features in TimescaleDB v2.30.0**
Blazing fast `LIMIT` queries with the newly introduced `DeferredChunkAppend`. This custom node reduces planning significantly by delaying chunk expansion. During planning the hypertable stays unexpanded and only during execution are chunks enumerated on demand. Combined with the optimizations to `FIRST` and `LAST` sparse indexes, this addition executes last-point queries far more efficiently and quickly.  This changes the scaling of the "What is the last reading from this sensor" query from linear with number of chunks to constant if it can be found in the most recent chunk. The true power of the custom node starts to show with increasing amount of chunks, see [more elaborate benchmarks](#10292).

**Features**
* [#10147](#10147) Support segmentwise batch sorted merge for overlapping batches
* [#10292](#10292) Add `DeferredChunkAppend` custom scan
* [#10354](#10354) Adds DML support for concurrent compaction
* [#10388](#10388) Add custom toaster for compression

**Bugfixes**
* [#10058](#10058) Apply new sortkeys for in-memory recompression
* [#10128](#10128) Include hypertable chunks in publications created with `FOR TABLES IN SCHEMA`
* [#10325](#10325) Avoid test errors when building from a source archive without a git repository
* [#10408](#10408) Verify columns and their types in `create_compressed_chunk`
* [#10515](#10515) Fix row level security checks after dropping hypertable columns
* [#9905](#9905) Potentially incorrect result of a join when the join clause contains `time_bucket`
* [#9920](#9920) Fix the "XX000: failed to evaluate runtime constant in vectorized filter" error in some queries that use stable functions in `WHERE` clause and the columnar aggregation pipeline
* [#10499](#10499) Potentially wrong query result when hypertable chunks are filtered out at query run time, the filter condition uses an uncorrelated subquery, and the query uses a parallel execution plan
* [#10513](#10513) Remove `user_catalog_table` option from catalog tables
* [#10506](#10506) Correctly match `NULL` tuples to compressed batches with `NULL` boundaries during recompression
* [#10524](#10524) Shared memory leak in the chunk stats subsystem when databases are dropped
* [#10535](#10535) Fix chunk merging with default sparse indexes
* [#10536](#10536) Skip batch size check when direct compress is set as hypertable option
* [#10539](#10539) Allow deletes from the policy chunk stats table when the database publishes all tables

**GUCs**
* `enable_deferred_chunk_append`: Custom scan node for hypertables that iterates chunks at execution instead of expanding every chunk at plan time. Default: true.
* `use_custom_toaster`: Use a custom TOAST writer for compressed row inserts. Default: false.

**Thanks**
* @tureba for reporting the problem with building from a source archive without a git repository [#10325](#10325)
* @AlexFavre for reporting a failed extension update when a publication for all tables exists [#10477](#10477)
* @peterecofit for reporting potentially wrong query result when hypertable chunks are filtered out at query run time [#10503](#10503)
* @esdanieljaegers for reporting the issue and providing steps for reproduction [#10511](#10511)
svenklemm added a commit that referenced this pull request Sep 8, 2026
This release contains performance improvements and bug fixes since the 2.29.2 release. We recommend that you upgrade at the next available opportunity.

**Highlighted features in TimescaleDB v2.30.0**
Blazing fast `LIMIT` queries with the newly introduced `DeferredChunkAppend`. This custom node reduces planning significantly by delaying chunk expansion. During planning the hypertable stays unexpanded and only during execution are chunks enumerated on demand. Combined with the optimizations to `FIRST` and `LAST` sparse indexes, this addition executes last-point queries far more efficiently and quickly.  This changes the scaling of the "What is the last reading from this sensor" query from linear with number of chunks to constant if it can be found in the most recent chunk. The true power of the custom node starts to show with increasing amount of chunks, see [more elaborate benchmarks](#10292).

**Features**
* [#10147](#10147) Support segmentwise batch sorted merge for overlapping batches
* [#10292](#10292) Add `DeferredChunkAppend` custom scan
* [#10354](#10354) Adds DML support for concurrent compaction
* [#10388](#10388) Add custom toaster for compression

**Bugfixes**
* [#10058](#10058) Apply new sortkeys for in-memory recompression
* [#10128](#10128) Include hypertable chunks in publications created with `FOR TABLES IN SCHEMA`
* [#10325](#10325) Avoid test errors when building from a source archive without a git repository
* [#10408](#10408) Verify columns and their types in `create_compressed_chunk`
* [#10515](#10515) Fix row level security checks after dropping hypertable columns
* [#9905](#9905) Potentially incorrect result of a join when the join clause contains `time_bucket`
* [#9920](#9920) Fix the "XX000: failed to evaluate runtime constant in vectorized filter" error in some queries that use stable functions in `WHERE` clause and the columnar aggregation pipeline
* [#10499](#10499) Potentially wrong query result when hypertable chunks are filtered out at query run time, the filter condition uses an uncorrelated subquery, and the query uses a parallel execution plan
* [#10513](#10513) Remove `user_catalog_table` option from catalog tables
* [#10506](#10506) Correctly match `NULL` tuples to compressed batches with `NULL` boundaries during recompression
* [#10524](#10524) Shared memory leak in the chunk stats subsystem when databases are dropped
* [#10535](#10535) Fix chunk merging with default sparse indexes
* [#10536](#10536) Skip batch size check when direct compress is set as hypertable option
* [#10539](#10539) Allow deletes from the policy chunk stats table when the database publishes all tables

**GUCs**
* `enable_deferred_chunk_append`: Custom scan node for hypertables that iterates chunks at execution instead of expanding every chunk at plan time. Default: true.
* `use_custom_toaster`: Use a custom TOAST writer for compressed row inserts. Default: false.

**Thanks**
* @tureba for reporting the problem with building from a source archive without a git repository [#10325](#10325)
* @AlexFavre for reporting a failed extension update when a publication for all tables exists [#10477](#10477)
* @peterecofit for reporting potentially wrong query result when hypertable chunks are filtered out at query run time [#10503](#10503)
* @esdanieljaegers for reporting the issue and providing steps for reproduction [#10511](#10511)
svenklemm added a commit that referenced this pull request Sep 8, 2026
This release contains performance improvements and bug fixes since the 2.29.2 release. We recommend that you upgrade at the next available opportunity.

**Highlighted features in TimescaleDB v2.30.0**
Blazing fast `LIMIT` queries with the newly introduced `DeferredChunkAppend`. This custom node reduces planning significantly by delaying chunk expansion. During planning the hypertable stays unexpanded and only during execution are chunks enumerated on demand. Combined with the optimizations to `FIRST` and `LAST` sparse indexes, this addition executes last-point queries far more efficiently and quickly.  This changes the scaling of the "What is the last reading from this sensor" query from linear with number of chunks to constant if it can be found in the most recent chunk. The true power of the custom node starts to show with increasing amount of chunks, see [more elaborate benchmarks](#10292).

**Features**
* [#10147](#10147) Support segmentwise batch sorted merge for overlapping batches
* [#10292](#10292) Add `DeferredChunkAppend` custom scan
* [#10354](#10354) Adds DML support for concurrent compaction
* [#10388](#10388) Add custom toaster for compression

**Bugfixes**
* [#10058](#10058) Apply new sortkeys for in-memory recompression
* [#10128](#10128) Include hypertable chunks in publications created with `FOR TABLES IN SCHEMA`
* [#10325](#10325) Avoid test errors when building from a source archive without a git repository
* [#10408](#10408) Verify columns and their types in `create_compressed_chunk`
* [#10515](#10515) Fix row level security checks after dropping hypertable columns
* [#9905](#9905) Potentially incorrect result of a join when the join clause contains `time_bucket`
* [#9920](#9920) Fix the "XX000: failed to evaluate runtime constant in vectorized filter" error in some queries that use stable functions in `WHERE` clause and the columnar aggregation pipeline
* [#10499](#10499) Potentially wrong query result when hypertable chunks are filtered out at query run time, the filter condition uses an uncorrelated subquery, and the query uses a parallel execution plan
* [#10513](#10513) Remove `user_catalog_table` option from catalog tables
* [#10506](#10506) Correctly match `NULL` tuples to compressed batches with `NULL` boundaries during recompression
* [#10524](#10524) Shared memory leak in the chunk stats subsystem when databases are dropped
* [#10535](#10535) Fix chunk merging with default sparse indexes
* [#10536](#10536) Skip batch size check when direct compress is set as hypertable option
* [#10539](#10539) Allow deletes from the policy chunk stats table when the database publishes all tables

**GUCs**
* `enable_deferred_chunk_append`: Custom scan node for hypertables that iterates chunks at execution instead of expanding every chunk at plan time. Default: true.
* `use_custom_toaster`: Use a custom TOAST writer for compressed row inserts. Default: false.

**Thanks**
* @tureba for reporting the problem with building from a source archive without a git repository [#10325](#10325)
* @AlexFavre for reporting a failed extension update when a publication for all tables exists [#10477](#10477)
* @peterecofit for reporting potentially wrong query result when hypertable chunks are filtered out at query run time [#10503](#10503)
* @esdanieljaegers for reporting the issue and providing steps for reproduction [#10511](#10511)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported-2.29.x llm-fuzzer Issue found by llm-fuzzer released-2.30.0 Released in 2.30.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wrong handling of dropped columns with RLS policy

4 participants