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 segfault in chunk_append with space partitioning #2256

Merged
merged 1 commit into from Aug 25, 2020

Conversation

svenklemm
Copy link
Member

@svenklemm svenklemm commented Aug 25, 2020

When postgres prunes children before we create the ChunkAppend
path there might be a mismatch between the children of the path
and the ordered list of children in a space partitioned hypertable.

Fixes #1841

@svenklemm svenklemm requested a review from a team as a code owner August 25, 2020 08:26
@svenklemm svenklemm requested review from pmwkaa, WireBaron, gayyappan, erimatnor, k-rus and mkindahl and removed request for a team August 25, 2020 08:26
Copy link
Contributor

@pmwkaa pmwkaa left a comment

Choose a reason for hiding this comment

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

Is it possible to make a test case for it?

When postgres prunes children before we create the ChunkAppend
path there might be a mismatch between the children of the path
and the ordered list of children in a space partitioned hypertable.

Fixes timescale#1841
@codecov
Copy link

codecov bot commented Aug 25, 2020

Codecov Report

Merging #2256 into master will increase coverage by 0.12%.
The diff coverage is 93.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2256      +/-   ##
==========================================
+ Coverage   90.08%   90.21%   +0.12%     
==========================================
  Files         211      211              
  Lines       34328    34240      -88     
==========================================
- Hits        30924    30889      -35     
+ Misses       3404     3351      -53     
Impacted Files Coverage Δ
src/chunk.h 100.00% <ø> (ø)
src/cross_module_fn.c 57.48% <ø> (+0.89%) ⬆️
src/dimension.c 95.38% <ø> (-0.10%) ⬇️
tsl/src/chunk.c 93.54% <ø> (ø)
tsl/src/init.c 88.88% <ø> (ø)
src/bgw/job_stat.c 87.81% <50.00%> (-0.45%) ⬇️
src/chunk_append/chunk_append.c 97.36% <75.00%> (-0.61%) ⬇️
tsl/src/bgw_policy/job.c 83.50% <75.00%> (-0.27%) ⬇️
src/time_utils.c 88.88% <88.88%> (ø)
src/chunk.c 95.32% <98.11%> (+0.13%) ⬆️
... and 14 more

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 f872775...d247c6f. Read the comment docs.

@svenklemm svenklemm merged commit 3d9e77e into timescale:master Aug 25, 2020
@svenklemm svenklemm added this to the 1.7.3 milestone Aug 25, 2020
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Aug 25, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address bugs in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* timescale#2059 Improve infering start and stop arguments from gapfill query
* timescale#2067 Support moving compressed chunks
* timescale#2068 Apply SET TABLESPACE for compressed chunks
* timescale#2090 Fix index creation with IF NOT EXISTS for existing indexes
* timescale#2092 Fix delete on tables involving hypertables with compression
* timescale#2116 Propagate privileges from hypertables to chunks
* timescale#2150 Lock dimension slice tuple when scanning
* timescale#2164 Fix telemetry installed_time format
* timescale#2184 Fix background worker scheduler memory consumption
* timescale#2222 Fix `negative bitmapset member not allowed` in decompression
* timescale#2256 Fix segfault in chunk_append with space partitioning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @sezaru for reporting an issue with background worker scheduler memory consumption
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Aug 26, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address bugs in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* timescale#2059 Improve infering start and stop arguments from gapfill query
* timescale#2067 Support moving compressed chunks
* timescale#2068 Apply SET TABLESPACE for compressed chunks
* timescale#2090 Fix index creation with IF NOT EXISTS for existing indexes
* timescale#2092 Fix delete on tables involving hypertables with compression
* timescale#2116 Propagate privileges from hypertables to chunks
* timescale#2150 Lock dimension slice tuple when scanning
* timescale#2164 Fix telemetry installed_time format
* timescale#2184 Fix background worker scheduler memory consumption
* timescale#2222 Fix `negative bitmapset member not allowed` in decompression
* timescale#2256 Fix segfault in chunk_append with space partitioning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @sezaru for reporting an issue with background worker scheduler memory consumption
@svenklemm svenklemm mentioned this pull request Aug 26, 2020
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Aug 26, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address bugs in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* timescale#2059 Improve infering start and stop arguments from gapfill query
* timescale#2067 Support moving compressed chunks
* timescale#2068 Apply SET TABLESPACE for compressed chunks
* timescale#2090 Fix index creation with IF NOT EXISTS for existing indexes
* timescale#2092 Fix delete on tables involving hypertables with compression
* timescale#2116 Propagate privileges from hypertables to chunks
* timescale#2150 Lock dimension slice tuple when scanning
* timescale#2164 Fix telemetry installed_time format
* timescale#2184 Fix background worker scheduler memory consumption
* timescale#2222 Fix `negative bitmapset member not allowed` in decompression
* timescale#2256 Fix segfault in chunk_append with space partitioning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @sezaru for reporting an issue with background worker scheduler memory consumption
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Aug 26, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address bugs in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* timescale#2059 Improve infering start and stop arguments from gapfill query
* timescale#2067 Support moving compressed chunks
* timescale#2068 Apply SET TABLESPACE for compressed chunks
* timescale#2090 Fix index creation with IF NOT EXISTS for existing indexes
* timescale#2092 Fix delete on tables involving hypertables with compression
* timescale#2164 Fix telemetry installed_time format
* timescale#2184 Fix background worker scheduler memory consumption
* timescale#2222 Fix `negative bitmapset member not allowed` in decompression
* timescale#2255 Propagate privileges from hypertables to chunks
* timescale#2256 Fix segfault in chunk_append with space partitioning
* timescale#2259 Fix recursion in cache processing
* timescale#2261 Lock dimension slice tuple when scanning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @fvannee for reporting an issue with cache invalidation
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @sezaru for reporting an issue with background worker scheduler memory consumption
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Aug 27, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address bugs in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* timescale#2059 Improve infering start and stop arguments from gapfill query
* timescale#2067 Support moving compressed chunks
* timescale#2068 Apply SET TABLESPACE for compressed chunks
* timescale#2090 Fix index creation with IF NOT EXISTS for existing indexes
* timescale#2092 Fix delete on tables involving hypertables with compression
* timescale#2164 Fix telemetry installed_time format
* timescale#2184 Fix background worker scheduler memory consumption
* timescale#2222 Fix `negative bitmapset member not allowed` in decompression
* timescale#2255 Propagate privileges from hypertables to chunks
* timescale#2256 Fix segfault in chunk_append with space partitioning
* timescale#2259 Fix recursion in cache processing
* timescale#2261 Lock dimension slice tuple when scanning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @fvannee for reporting an issue with cache invalidation
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @sezaru for reporting an issue with background worker scheduler memory consumption
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Aug 27, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address issues in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* timescale#2059 Improve infering start and stop arguments from gapfill query
* timescale#2067 Support moving compressed chunks
* timescale#2068 Apply SET TABLESPACE for compressed chunks
* timescale#2090 Fix index creation with IF NOT EXISTS for existing indexes
* timescale#2092 Fix delete on tables involving hypertables with compression
* timescale#2164 Fix telemetry installed_time format
* timescale#2184 Fix background worker scheduler memory consumption
* timescale#2222 Fix `negative bitmapset member not allowed` in decompression
* timescale#2255 Propagate privileges from hypertables to chunks
* timescale#2256 Fix segfault in chunk_append with space partitioning
* timescale#2259 Fix recursion in cache processing
* timescale#2261 Lock dimension slice tuple when scanning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @fvannee for reporting an issue with cache invalidation
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @prathamesh-sonpatki for contributing a typo fix
* @sezaru for reporting an issue with background worker scheduler memory consumption
svenklemm added a commit that referenced this pull request Aug 27, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address issues in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* #2059 Improve infering start and stop arguments from gapfill query
* #2067 Support moving compressed chunks
* #2068 Apply SET TABLESPACE for compressed chunks
* #2090 Fix index creation with IF NOT EXISTS for existing indexes
* #2092 Fix delete on tables involving hypertables with compression
* #2164 Fix telemetry installed_time format
* #2184 Fix background worker scheduler memory consumption
* #2222 Fix `negative bitmapset member not allowed` in decompression
* #2255 Propagate privileges from hypertables to chunks
* #2256 Fix segfault in chunk_append with space partitioning
* #2259 Fix recursion in cache processing
* #2261 Lock dimension slice tuple when scanning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @fvannee for reporting an issue with cache invalidation
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @prathamesh-sonpatki for contributing a typo fix
* @sezaru for reporting an issue with background worker scheduler memory consumption
svenklemm added a commit that referenced this pull request Aug 27, 2020
This maintenance release contains bugfixes since the 1.7.2 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address issues in compression,
drop_chunks and the background worker scheduler.

**Bugfixes**
* #2059 Improve infering start and stop arguments from gapfill query
* #2067 Support moving compressed chunks
* #2068 Apply SET TABLESPACE for compressed chunks
* #2090 Fix index creation with IF NOT EXISTS for existing indexes
* #2092 Fix delete on tables involving hypertables with compression
* #2164 Fix telemetry installed_time format
* #2184 Fix background worker scheduler memory consumption
* #2222 Fix `negative bitmapset member not allowed` in decompression
* #2255 Propagate privileges from hypertables to chunks
* #2256 Fix segfault in chunk_append with space partitioning
* #2259 Fix recursion in cache processing
* #2261 Lock dimension slice tuple when scanning

**Thanks**
* @akamensky for reporting an issue with drop_chunks and ChunkAppend with space partitioning
* @dewetburger430 for reporting an issue with setting tablespace for compressed chunks
* @fvannee for reporting an issue with cache invalidation
* @nexces for reporting an issue with ChunkAppend on space-partitioned hypertables
* @PichetGoulu for reporting an issue with index creation and IF NOT EXISTS
* @prathamesh-sonpatki for contributing a typo fix
* @sezaru for reporting an issue with background worker scheduler memory consumption
@svenklemm svenklemm deleted the chunk_append_segfault branch April 18, 2021 14:32
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.

Segfault in 1.6.1 in complex query
3 participants