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

Handle stats properly for range types #4527

Merged
merged 1 commit into from
Jul 20, 2022
Merged

Conversation

nikkhils
Copy link
Contributor

For range types, the operator entry in statistics table is invalid.
Also, certain range types don't have "VALUES" but only have "NUMBERS"
entries.

@nikkhils nikkhils requested a review from a team as a code owner July 19, 2022 13:46
@nikkhils nikkhils self-assigned this Jul 19, 2022
@nikkhils nikkhils requested review from pmwkaa and erimatnor and removed request for a team July 19, 2022 13:46
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #4527 (bc182fc) into main (d561928) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4527      +/-   ##
==========================================
+ Coverage   90.20%   90.23%   +0.02%     
==========================================
  Files         222      222              
  Lines       41088    41088              
==========================================
+ Hits        37065    37074       +9     
+ Misses       4023     4014       -9     
Impacted Files Coverage Δ
tsl/src/chunk_api.c 94.90% <100.00%> (+<0.01%) ⬆️
tsl/src/reorder.c 85.37% <0.00%> (-0.27%) ⬇️
tsl/src/bgw_policy/job.c 88.62% <0.00%> (-0.05%) ⬇️
src/bgw/job.c 93.42% <0.00%> (+0.28%) ⬆️
src/bgw/scheduler.c 86.43% <0.00%> (+2.65%) ⬆️

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 0e9dd3c...bc182fc. Read the comment docs.

@nikkhils
Copy link
Contributor Author

tsl/src/chunk_api.c Outdated Show resolved Hide resolved
@svenklemm
Copy link
Member

Please dont forget to add changelog entry

For range types, the operator entry in statistics table is invalid.
Also, certain range types don't have "VALUES" but only have "NUMBERS"
entries.
@nikkhils
Copy link
Contributor Author

Please dont forget to add changelog entry

Added changelog entry as well

@nikkhils nikkhils merged commit 63a80ee into timescale:main Jul 20, 2022
@nikkhils nikkhils deleted the rng_stats branch July 20, 2022 07:01
@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.

3 participants