pgsql: Backpatch tuplesort.c assertion.

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Backpatch tuplesort.c assertion.
Date: 2020-07-29 23:01:20
Message-ID: E1k0v4a-0006P3-6S@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Backpatch tuplesort.c assertion.

Backpatch an assertion (that was originally added to Postgres 12 by
commit dd299df8189) that seems broadly useful. The assertion can detect
violations of the HOT invariant (i.e. no two index tuples can point to
the same heap TID) when CREATE INDEX somehow incorrectly allows that to
take place.

For example, a IndexBuildHeapScan/heapam_index_build_range_scan bug
might result in two tuples that both point to the same heap TID. If
these two tuples also happen to be duplicates, the assertion will fail.

Discussion: https://postgr.es/m/CAH2-WzmBxu4o=pMsniur+bwHqCGCmV_AOLkuK6BuU7ngA6evqw@mail.gmail.com
Backpatch: 9.5-11 only

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 6 ++++++
1 file changed, 6 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2020-07-30 05:46:20 pgsql: Introduce a WaitEventSet for the stats collector.
Previous Message Peter Geoghegan 2020-07-29 21:15:18 pgsql: Add hash_mem_multiplier GUC.