aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2021-09-20 14:26:20 -0700
committerPeter Geoghegan <pg@bowt.ie>2021-09-20 14:26:20 -0700
commitcd35d3909bf1665b688eac691a0f2087c55610de (patch)
treeb2cba54b1ff94881c795c5e104e3a0919be3c547 /src/backend/access/heap
parentf230614da28b1b60a4c8faf1fe0f51f866c3093c (diff)
downloadpostgresql-cd35d3909bf1665b688eac691a0f2087c55610de.tar.gz
postgresql-cd35d3909bf1665b688eac691a0f2087c55610de.zip
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 4228817449. The assertion can probably only fail on Postgres 14 and master. Earlier releases don't have commit 3c3b8a4b, 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 4228817449.
Diffstat (limited to 'src/backend/access/heap')
-rw-r--r--src/backend/access/heap/heapam.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index d0109ea16f6..c2a38b55f19 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -7134,10 +7134,7 @@ heap_compute_xid_horizon_for_tuples(Relation rel,
/* Some sanity checks */
if (offnum < FirstOffsetNumber || offnum > maxoff)
- {
- Assert(false);
break;
- }
lp = PageGetItemId(page, offnum);
if (ItemIdIsRedirected(lp))