pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Demote pg_unreachable() in heapam to an assertion.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Demote pg_unreachable() in heapam to an assertion.
@ 2021-10-29 17:57 Peter Geoghegan <pg@bowt.ie>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Geoghegan @ 2021-10-29 17:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Demote pg_unreachable() in heapam to an assertion.

Commit d168b66682, which overhauled index deletion, added a
pg_unreachable() to the end of a sort comparator used when sorting heap
TIDs from an index page.  This allows the compiler to apply
optimizations that assume that the heap TIDs from the index AM must
always be unique.

That doesn't seem like a good idea now, given recent reports of
corruption involving duplicate TIDs in indexes on Postgres 14.  Demote
to an assertion, just in case.

Backpatch: 14-, where index deletion was overhauled.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5f55fc5a346e1ab54f3d756e368d276b95be8c4a

Modified Files
--------------
src/backend/access/heap/heapam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Demote pg_unreachable() in heapam to an assertion.
@ 2021-10-29 17:57 Peter Geoghegan <pg@bowt.ie>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Geoghegan @ 2021-10-29 17:57 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Demote pg_unreachable() in heapam to an assertion.

Commit d168b66682, which overhauled index deletion, added a
pg_unreachable() to the end of a sort comparator used when sorting heap
TIDs from an index page.  This allows the compiler to apply
optimizations that assume that the heap TIDs from the index AM must
always be unique.

That doesn't seem like a good idea now, given recent reports of
corruption involving duplicate TIDs in indexes on Postgres 14.  Demote
to an assertion, just in case.

Backpatch: 14-, where index deletion was overhauled.

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/backend/access/heap/heapam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-10-29 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 17:57 pgsql: Demote pg_unreachable() in heapam to an assertion. Peter Geoghegan <pg@bowt.ie>
2021-10-29 17:57 pgsql: Demote pg_unreachable() in heapam to an assertion. Peter Geoghegan <pg@bowt.ie>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox