Repository navigation
Fix wrong-result and crash bugs in summary build, maintenance and pruning (0.1.2) - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correctness release (0.1.2). 0.1.1 can return wrong results (missing rows) and can crash the cluster. Every case below was reproduced against 0.1.1 and is covered by a test here. Full list in
CHANGELOG.md.Crashes
SELECT 1/0) in a backend that had loaded the extension aborted the backend, so the whole cluster restarted. The planner hooks are now#[pg_guard]ed.REINDEXof a table_range index crashed the same way: the SPI build planned SQL over a heap whose index was being reindexed.Wrong results
unbounded(e.g. a value too large for the metapage).DateStyle/extra_float_digits. These are now pinned while bounds are written and read.Other
heap_tuples(0.1.1 setreltuplesto 0).uuid/booleancolumns now build:min()/max()aggregates are no longer used.search_pathand stops a caller'ssearch_pathfrom substituting functions.amsummarizing = true, so updates of indexed columns can stay HOT.REINDEX.sql/pg_table_range--0.1.1--0.1.2.sqlwarns how many indexes need it.Upgrade
Install, restart PostgreSQL (a backend still running 0.1.1 cannot read v2 summaries and would skip widening them), then
ALTER EXTENSION pg_table_range UPDATE, thenREINDEXeach table_range index.Testing
cargo pgrx test: 43/43 on PG18, and on PG16 with PostGIS installed. Not run locally on PG17.tests/multisession.sh(cross-backend invalidation, REPEATABLE READ build, concurrent widening) passes on 0.1.2 and fails on 0.1.1. It is wired into CI; that step has not run on GitHub yet.Known limits (marked
shortcut:in code)🤖 Generated with Claude Code