Skip to content

Defer initialization of child plan states in ModifyHypertable node - #9952

Merged
akuzm merged 32 commits into
timescale:mainfrom
akuzm:defer-bitmap
Jun 18, 2026
Merged

Defer initialization of child plan states in ModifyHypertable node#9952
akuzm merged 32 commits into
timescale:mainfrom
akuzm:defer-bitmap

Conversation

@akuzm

@akuzm akuzm commented Jun 2, 2026

Copy link
Copy Markdown
Member

The underlying scans must be initialized after we decompress the data potentially affected by DML operations, so that the scans see this data. At the moment we're restarting the scans after decompression, but this is not the proper Postgres protocol, so it breaks.

Fixes #9913

The underlying scans must be initialized after we decompress the data
potentially affected by DML operations, so that the scans see this data.
At the moment we're restarting the scans after decompression, but this
is not the proper Postgres protocol, so it breaks.
@codecov

codecov Bot commented Jun 5, 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 marked this pull request as ready for review June 10, 2026 11:46
@github-actions

Copy link
Copy Markdown

@Poroma-Banerjee, @dbeck: please review this pull request.

Powered by pull-review

@antekresic antekresic 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.

Great improvement, glad to have the workaround removed 🎉

Comment thread src/nodes/modify_hypertable.c
Comment thread tsl/test/sql/compress_dml_aux.sql
@akuzm
akuzm enabled auto-merge (squash) June 18, 2026 19:02
@akuzm akuzm modified the milestone: v2.28.1 Jun 18, 2026
@akuzm
akuzm merged commit 9636ef2 into timescale:main Jun 18, 2026
69 of 78 checks passed
@akuzm
akuzm deleted the defer-bitmap branch June 18, 2026 20:09
@timescale-automation

Copy link
Copy Markdown
Member

Automated backport to 2.28.x not done: cherry-pick failed.

Git status

HEAD detached at origin/2.28.x
You are currently cherry-picking commit 9636ef2bd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .unreleased/dml-bitmap-crash
	modified:   src/nodes/modify_hypertable.c
	modified:   src/nodes/modify_hypertable.h
	modified:   src/nodes/modify_hypertable_exec.c
	modified:   tsl/src/compression/compression_dml.c
	modified:   tsl/src/planner.c
	new file:   tsl/test/expected/compress_dml_aux.out
	new file:   tsl/test/expected/compress_dml_bitmap_rescan.out
	deleted:    tsl/test/expected/compression_delete_bitmapscan-16.out
	deleted:    tsl/test/expected/compression_delete_bitmapscan-18.out
	renamed:    tsl/test/expected/compression_delete_bitmapscan-17.out -> tsl/test/expected/compression_delete_bitmapscan.out
	modified:   tsl/test/expected/compression_update_delete-16.out
	new file:   tsl/test/sql/compress_dml_aux.sql
	new file:   tsl/test/sql/compress_dml_bitmap_rescan.sql
	renamed:    tsl/test/sql/compression_delete_bitmapscan.sql.in -> tsl/test/sql/compression_delete_bitmapscan.sql

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   tsl/test/sql/CMakeLists.txt


Job log

@timescale-automation timescale-automation added the auto-backport-not-done Automated backport of this PR has failed non-retriably (e.g. conflicts) label Jun 18, 2026
akuzm added a commit to akuzm/timescaledb that referenced this pull request Jun 22, 2026
…imescale#9952)

The underlying scans must be initialized after we decompress the data
potentially affected by DML operations, so that the scans see this data.
At the moment we're restarting the scans after decompression, but this
is not the proper Postgres protocol, so it breaks.

Fixes timescale#9913

(cherry picked from commit 9636ef2)
akuzm added a commit that referenced this pull request Jun 22, 2026
…9952)

The underlying scans must be initialized after we decompress the data
potentially affected by DML operations, so that the scans see this data.
At the moment we're restarting the scans after decompression, but this
is not the proper Postgres protocol, so it breaks.

Fixes #9913

(cherry picked from commit 9636ef2)
kpan2034 pushed a commit to kpan2034/timescaledb that referenced this pull request Jul 1, 2026
…imescale#9952)

The underlying scans must be initialized after we decompress the data
potentially affected by DML operations, so that the scans see this data.
At the moment we're restarting the scans after decompression, but this
is not the proper Postgres protocol, so it breaks.


Fixes timescale#9913
@timescale-automation timescale-automation added the released-2.29.0 Released in 2.29.0 label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport-not-done Automated backport of this PR has failed non-retriably (e.g. conflicts) backported-2.28.x released-2.28.1 Released in 2.28.1 released-2.29.0 Released in 2.29.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assertion failure in DELETE from compressed chunk with bitmap heap scan

5 participants