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

Fix prepared statement param handling in ChunkAppend #4517

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

svenklemm
Copy link
Member

This patch fixes the param handling in prepared statements for generic
plans in ChunkAppend making those params usable in chunk exclusion.
Previously those params would not be resolved and therefore not used
for chunk exclusion.

Fixes #3719

@svenklemm svenklemm requested a review from a team as a code owner July 18, 2022 05:17
@svenklemm svenklemm requested review from pmwkaa and erimatnor and removed request for a team July 18, 2022 05:17
@svenklemm svenklemm self-assigned this Jul 18, 2022
Copy link
Contributor

@jnidzwetzki jnidzwetzki left a comment

Choose a reason for hiding this comment

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

Some regression tests fail. Otherwise, it looks good to me.

This patch fixes the param handling in prepared statements for generic
plans in ChunkAppend making those params usable in chunk exclusion.
Previously those params would not be resolved and therefore not used
for chunk exclusion.

Fixes timescale#3719
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #4517 (089f052) into main (cfac68e) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4517      +/-   ##
==========================================
- Coverage   90.21%   90.18%   -0.04%     
==========================================
  Files         222      222              
  Lines       41079    41079              
==========================================
- Hits        37061    37048      -13     
- Misses       4018     4031      +13     
Impacted Files Coverage Δ
src/nodes/chunk_append/exec.c 93.66% <100.00%> (+0.03%) ⬆️
src/bgw/scheduler.c 82.89% <0.00%> (-3.54%) ⬇️
src/loader/bgw_message_queue.c 85.52% <0.00%> (-2.64%) ⬇️
src/bgw/job.c 93.14% <0.00%> (-0.29%) ⬇️
tsl/src/bgw_policy/job.c 88.62% <0.00%> (-0.05%) ⬇️
src/nodes/chunk_insert_state.c 97.61% <0.00%> (-0.01%) ⬇️
tsl/src/nodes/compress_dml/compress_dml.c 100.00% <0.00%> (+9.52%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cfac68e...089f052. Read the comment docs.

@svenklemm svenklemm merged commit 0d175b2 into timescale:main Jul 19, 2022
@svenklemm svenklemm added this to the TimescaleDB 2.7.2 milestone Jul 21, 2022
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* timescale#4517 Fix prepared statement param handling in ChunkAppend
* timescale#4522 Fix ANALYZE on dist hypertable for a set of nodes
* timescale#4526 Fix gapfill group comparison for TOASTed values
* timescale#4527 Handle stats properly for range types
* timescale#4532 Fix memory leak in function telemetry
* timescale#4534 Use explicit memory context with hash_create
* timescale#4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill , @hongquani, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
@svenklemm svenklemm mentioned this pull request Jul 22, 2022
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* timescale#4517 Fix prepared statement param handling in ChunkAppend
* timescale#4522 Fix ANALYZE on dist hypertable for a set of nodes
* timescale#4526 Fix gapfill group comparison for TOASTed values
* timescale#4527 Handle stats properly for range types
* timescale#4532 Fix memory leak in function telemetry
* timescale#4534 Use explicit memory context with hash_create
* timescale#4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill , @hongquani, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* timescale#4517 Fix prepared statement param handling in ChunkAppend
* timescale#4522 Fix ANALYZE on dist hypertable for a set of nodes
* timescale#4526 Fix gapfill group comparison for TOASTed values
* timescale#4527 Handle stats properly for range types
* timescale#4532 Fix memory leak in function telemetry
* timescale#4534 Use explicit memory context with hash_create
* timescale#4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
svenklemm added a commit that referenced this pull request Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* #4517 Fix prepared statement param handling in ChunkAppend
* #4522 Fix ANALYZE on dist hypertable for a set of nodes
* #4526 Fix gapfill group comparison for TOASTed values
* #4527 Handle stats properly for range types
* #4532 Fix memory leak in function telemetry
* #4534 Use explicit memory context with hash_create
* #4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
svenklemm added a commit that referenced this pull request Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* #4517 Fix prepared statement param handling in ChunkAppend
* #4522 Fix ANALYZE on dist hypertable for a set of nodes
* #4526 Fix gapfill group comparison for TOASTed values
* #4527 Handle stats properly for range types
* #4532 Fix memory leak in function telemetry
* #4534 Use explicit memory context with hash_create
* #4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
svenklemm added a commit that referenced this pull request Jul 22, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* #4517 Fix prepared statement param handling in ChunkAppend
* #4522 Fix ANALYZE on dist hypertable for a set of nodes
* #4526 Fix gapfill group comparison for TOASTed values
* #4527 Handle stats properly for range types
* #4532 Fix memory leak in function telemetry
* #4534 Use explicit memory context with hash_create
* #4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
svenklemm added a commit that referenced this pull request Jul 25, 2022
This release is a patch release. We recommend that you upgrade at the
next available opportunity.
Among other things this release fixes several memory leaks, handling
of TOASTed values in GapFill and parameter handling in prepared statements.

**Bugfixes**

* #4517 Fix prepared statement param handling in ChunkAppend
* #4522 Fix ANALYZE on dist hypertable for a set of nodes
* #4526 Fix gapfill group comparison for TOASTed values
* #4527 Handle stats properly for range types
* #4532 Fix memory leak in function telemetry
* #4534 Use explicit memory context with hash_create
* #4538 Fix chunk creation on hypertables with non-default statistics

**Thanks**

* @3a6u9ka, @bgemmill, @hongquan, @stl-leonid-kalmaev and @victor-sudakov for reporting a memory leak
* @hleung2021 and @laocaixw  for reporting an issue with parameter handling in prepared statements
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.

Unable to update records in uncompressed chunk of hypertable with prepared statements
3 participants