pgsql: heap_prepare_freeze_tuple: Simplify coding

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: heap_prepare_freeze_tuple: Simplify coding
Date: 2019-05-02 20:14:42
Message-ID: E1hMI6M-0002k8-Bs@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

heap_prepare_freeze_tuple: Simplify coding

Commit d2599ecfcc74 introduced some contorted, confused code around:
readers would think that it's possible for HeapTupleHeaderGetXmin return
a non-frozen value for some frozen tuples, which would be disastrous.
There's no actual bug, but it seems better to make it clearer.

Per gripe from Tom Lane and Andres Freund.
Discussion: https://postgr.es/m/30116.1555430496@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2bf372a4ae26337ee61cf7a82081cf4bed05182d

Modified Files
--------------
src/backend/access/heap/heapam.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-05-02 23:11:57 pgsql: Fix reindexing of pg_class indexes some more.
Previous Message Peter Geoghegan 2019-05-02 19:34:10 pgsql: Fix nbtsort.c's page space accounting.