TECHNOLOGY

PostgreSQL repairs GIN page deletion after an incomplete posting-tree split

In this article
THE QUICK TAKE

The GIN fix preserves sibling-page reachability after incomplete splits; suspected existing damage still requires a separate REINDEX assessment.

PostgreSQL 18.7 fixes GIN posting-tree page deletion after an incomplete page split. The old deletion step could disconnect sibling pages and make later index searches miss rows. This differs from leaving dead entries behind: the failure here breaks reachability of valid index content. The release recommends REINDEX when the damage is suspected, because installing corrected deletion logic does not reconnect every already corrupted index.

Missing rows can be an index-path symptom

The notes describe later index searches failing to find rows after sibling pages are disconnected. A proposed correctness comparison should use a trusted reference result and confirm the query path under examination. An empty or reduced result is not sufficient evidence that the table lacks matching rows. Conversely, a successful sequential scan does not establish that the GIN structure is sound; it can simply bypass the broken links that the index search needs.

The incomplete split is the specific precondition

PR-linked upstream code concerns deletion following an incomplete posting-tree split. Ordinary index creation and a simple deletion workload may never reach that state. A meaningful regression exercise needs controlled construction or instrumentation of the split-and-delete sequence. This is a proposed qualification requirement, not a claim that a generic stress test proves coverage. Record which structural path was exercised so a passing test remains interpretable when workload size or timing changes.

The release recommends REINDEX if this corruption is suspected. A post-update search that happens to find expected rows cannot rule out damage elsewhere in the same index. Maintenance planning should identify the affected index and retain the basis for rebuilding it. The patch fixes future page deletion behavior; repair needs an operation that reconstructs the structure, followed by checks appropriate to the application’s data rather than a single favorable lookup.

Separate this from other GIN maintenance fixes

The same release repairs missed cleanup during multi-pass VACUUM, but that is a different structural failure with different triggers. A test for one cannot certify the other merely because both use GIN and recommend rebuilding suspected damage. Operational reports should name the relevant path and resulting symptom. The practical conclusion here is preservation of reachable valid pages during a specific deletion sequence, with existing damage evaluated independently after the code update.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles