Skip to content

Commit cd35d39

Browse files
Remove overzealous index deletion assertion.
A broken HOT chain is not an unexpected condition, even when the offset number points past the end of the page's line pointer array. heap_prune_chain() does not (and never has) treated this condition as unexpected, so derivative code in heap_index_delete_tuples() shouldn't do so either. Oversight in commit 4228817. The assertion can probably only fail on Postgres 14 and master. Earlier releases don't have commit 3c3b8a4, which taught VACUUM to truncate the line pointer array of heap pages. Backpatch all the same, just to be consistent. Author: Peter Geoghegan <pg@bowt.ie> Reported-By: Alexander Lakhin <exclusion@gmail.com> Discussion: https://postgr.es/m/17197-9438f31f46705182@postgresql.org Backpatch: 12-, just like commit 4228817.
1 parent f230614 commit cd35d39

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/backend/access/heap/heapam.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7134,10 +7134,7 @@ heap_compute_xid_horizon_for_tuples(Relation rel,
71347134

71357135
/* Some sanity checks */
71367136
if (offnum < FirstOffsetNumber || offnum > maxoff)
7137-
{
7138-
Assert(false);
71397137
break;
7140-
}
71417138

71427139
lp = PageGetItemId(page, offnum);
71437140
if (ItemIdIsRedirected(lp))

0 commit comments

Comments
 (0)