-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/4971~1
head repository: postgresql-cfbot/postgresql
compare: cf/4971
- 9 commits
- 55 files changed
- 2 contributors
Commits on Nov 24, 2025
-
This is https://commitfest.postgresql.org/50/5160/ and https://commit…
…fest.postgresql.org/patch/5438/ merged in single commit. it is required for stability of stress tests.
Configuration menu - View commit details
-
Copy full SHA for 75416e0 - Browse repository at this point
Copy the full SHA 75416e0View commit details -
Add stress tests for concurrent index builds
Introduce stress tests for concurrent index operations: - test concurrent inserts/updates during CREATE/REINDEX INDEX CONCURRENTLY - cover various index types (btree, gin, gist, brin, hash, spgist) - test unique and non-unique indexes - test with expressions and predicates - test both parallel and non-parallel operations These tests verify the behavior of the following commits.
Configuration menu - View commit details
-
Copy full SHA for 8e17a64 - Browse repository at this point
Copy the full SHA 8e17a64View commit details -
Add STIR access method and flags related to auxiliary indexes
This patch provides infrastructure for following enhancements to concurrent index builds by: - ii_Auxiliary in IndexInfo: indicates that an index is an auxiliary index used during concurrent index build - validate_index in IndexVacuumInfo: set if index_bulk_delete called during the validation phase of concurrent index build - STIR(Short-Term Index Replacement) access method is introduced, intended solely for short-lived, auxiliary usage STIR functions designed as an ephemeral helper during concurrent index builds, temporarily storing TIDs without providing the full features of a typical access method. As such, it raises warnings or errors when accessed outside its specialized usage path. Planned to be used in following commits.
Configuration menu - View commit details
-
Copy full SHA for d0cbe37 - Browse repository at this point
Copy the full SHA d0cbe37View commit details -
Add Datum storage support to tuplestore
Extend tuplestore to store individual Datum values: - fixed-length datatypes: store raw bytes without a length header - variable-length datatypes: include a length header and padding - by-value types: store inline This support enables usages tuplestore for non-tuple data (TIDs) in the next commit.
Configuration menu - View commit details
-
Copy full SHA for 7345e31 - Browse repository at this point
Copy the full SHA 7345e31View commit details -
Use auxiliary indexes for concurrent index operations
Replace the second table full scan in concurrent index builds with an auxiliary index approach: - create a STIR auxiliary index with the same predicate (if exists) as in main index - use it to track tuples inserted during the first phase - merge auxiliary index with main index during validation to catch up new index with any tuples missed during the first phase - automatically drop auxiliary when main index is ready To merge main and auxiliary indexes: - index_bulk_delete called for both, TIDs put into tuplesort - both tuplesort are being sorted - both tuplesort scanned with two pointers looking for the TIDs present in auxiliary index, but absent in main one - all such TIDs are put into tuplestore - all TIDs in tuplestore are fetched using the stream, tuplestore used in heapam_index_validate_scan_read_stream_next to provide the next page to prefetch - if fetched tuple is alive - it is inserted into the main index This eliminates the need for a second full table scan during validation, improving performance especially for large tables. Affects both CREATE INDEX CONCURRENTLY and REINDEX INDEX CONCURRENTLY operations.
Configuration menu - View commit details
-
Copy full SHA for 6f4585f - Browse repository at this point
Copy the full SHA 6f4585fView commit details -
Track and drop auxiliary indexes in DROP/REINDEX
During concurrent index operations, auxiliary indexes may be left as orphaned objects when errors occur (junk auxiliary indexes). This patch improves the handling of such auxiliary indexes: - add auxiliaryForIndexId parameter to index_create() to track dependencies between main and auxiliary indexes - automatically drop auxiliary indexes when the main index is dropped - delete junk auxiliary indexes properly during REINDEX operations
Configuration menu - View commit details
-
Copy full SHA for e2eb401 - Browse repository at this point
Copy the full SHA e2eb401View commit details -
Optimize auxiliary index handling
Skip unnecessary computations for auxiliary indices by: - in the index‐insert path, detect auxiliary indexes and bypass Datum value computation - set indexUnchanged=false for auxiliary indices to avoid redundant checks These optimizations reduce overhead during concurrent index operations.
Configuration menu - View commit details
-
Copy full SHA for d85b1bb - Browse repository at this point
Copy the full SHA d85b1bbView commit details -
Refresh snapshot periodically during index validation
Enhances validation phase of concurrently built indexes by periodically refreshing snapshots rather than using a single reference snapshot. This addresses issues with xmin propagation during long-running validations. The validation now takes a fresh snapshot every few pages, allowing the xmin horizon to advance. This restores feature of commit d9d0762, which was reverted in commit e28bb88. New STIR-based approach is not depends on single reference snapshot anymore.
Configuration menu - View commit details
-
Copy full SHA for a0082cb - Browse repository at this point
Copy the full SHA a0082cbView commit details -
[CF 4971] v27 - [CREATE|RE] INDEX CONCURRENTLY with single heap scan
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/4971 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CADzfLwWrGYGE8=cg+6C57Nypv1Y-1mBv8BVzzPWVJy5EfR6YfQ@mail.gmail.com Author(s): Michail Nikolaev, Mihail Nikalayeu
Commitfest Bot committedNov 24, 2025 Configuration menu - View commit details
-
Copy full SHA for 1c510b5 - Browse repository at this point
Copy the full SHA 1c510b5View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/4971~1...cf/4971