Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent locking compressed tuples #7046

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

svenklemm
Copy link
Member

Error out when we detect that a scan is trying to lock compressed tuple. This does not block lock tuples on compressed hypertables in general but only errors for queries where actual compressed tuples would be returned. This will allow queries on compressed hypertables where compressed tuples are filtered by other means e.g. chunk exclusion or query constraints.
Not blocking this will produce a very misleading Could not read block 0 error.

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.80%. Comparing base (59f50f2) to head (d101adc).
Report is 216 commits behind head on main.

Files Patch % Lines
tsl/src/nodes/decompress_chunk/exec.c 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7046      +/-   ##
==========================================
+ Coverage   80.06%   81.80%   +1.73%     
==========================================
  Files         190      200      +10     
  Lines       37181    37232      +51     
  Branches     9450     9702     +252     
==========================================
+ Hits        29770    30456     +686     
+ Misses       2997     2876     -121     
+ Partials     4414     3900     -514     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@svenklemm svenklemm force-pushed the lock_compressed branch 3 times, most recently from f876a74 to 939f0f3 Compare June 19, 2024 12:59
@svenklemm svenklemm enabled auto-merge (rebase) June 19, 2024 13:04
Error out when we detect that a scan is trying to lock compressed
tuple. This does not block lock tuples on compressed hypertables
in general but only errors for queries where actual compressed
tuples would be returned. This will allow queries on compressed
hypertables where compressed tuples are filtered by other means
e.g. chunk exclusion or query constraints.
Not blocking this will produce a very misleading `Could not read
block 0` error.
@svenklemm svenklemm merged commit 1982f29 into timescale:main Jun 19, 2024
36 of 38 checks passed
@pallavisontakke pallavisontakke added this to the TimescaleDB 2.16.0 milestone Jul 12, 2024
pallavisontakke added a commit to pallavisontakke/timescaledb that referenced this pull request Jul 18, 2024
This release contains performance improvements and bug fixes since
the 2.15.3 release. We recommend that you upgrade at the next
available opportunity.

**Features**
* timescale#6880: Add support for the array operators used for compressed DML batch filtering.
* timescale#6895: Improve the compressed DML expression pushdown.
* timescale#6897: Add support for replica identity on compressed hypertables.
* timescale#6918: Remove support for PG13.
* timescale#6920: Rework compression activity wal markers.
* timescale#6989: Add support for foreign keys when converting plain tables to hypertables.
* timescale#7020: Add support for the chunk column statistics tracking.
* timescale#7048: Add an index scan for INSERT DML decompression.
* timescale#7075: Reduce decompression on the compressed INSERT.
* timescale#7101: Reduce decompressions for the compressed UPDATE/DELETE.
* timescale#7108 Reduce decompressions for INSERTs with UNIQUE constraints

**Bugfixes**
* timescale#7018: Fix `search_path` quoting in the compression defaults function.
* timescale#7046: Prevent locking for compressed tuples.
* timescale#7055: Fix the `scankey` for `segment by` columns, where the type `constant` is different to `variable`.
* timescale#7064: Fix the bug in the default `order by` calculation in compression.
* timescale#7069: Fix the index column name usage.
* timescale#7074: Fix the bug in the default `segment by` calculation in compression.

**Thanks**
@pallavisontakke pallavisontakke mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants