pgsql: Remove overzealous index deletion assertion.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove overzealous index deletion assertion.
Date: 2021-09-20 21:29:31
Message-ID: E1mSQqx-000715-Bo@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)bowt(dot)ie>
Reported-By: Alexander Lakhin <exclusion(at)gmail(dot)com>
Discussion: https://postgr.es/m/17197-9438f31f46705182@postgresql.org
Backpatch: 12-, just like commit 4228817449.

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a1708ab652eaef3e9405d5119721a9a4ecb6fcbd

Modified Files
--------------
src/backend/access/heap/heapam.c | 3 ---
1 file changed, 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-09-20 21:33:54 pgsql: Stamp 14rc1.
Previous Message Andres Freund 2021-09-20 21:22:25 pgsql: pgstat: Prepare to use mechanism for truncated rels also for dro