Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: "Wood, Dan" <hexpert@amazon.com>
Cc: Michael Paquier <michael.paquier@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, "Wong, Yi Wen" <yiwong@amazon.com>
Date: 2017-10-04T01:19:56Z
Lists: pgsql-hackers
On Tue, Oct 3, 2017 at 6:09 PM, Wood, Dan <hexpert@amazon.com> wrote:
> I’ve just started looking at this again after a few weeks break.

>                 if (TransactionIdIsValid(priorXmax) &&
>                         !TransactionIdEquals(priorXmax, HeapTupleHeaderGetXmin(htup)))
>                         break;

> We need to understand why these TXID equal checks exist.  Can we differentiate the cases they are protecting against with the two exceptions I’ve found?

I haven't read your remarks here in full, since I'm about to stop
working for the day, but I will point out that
src/backend/access/heap/README.HOT says a fair amount about this,
under "Abort Cases".


-- 
Peter Geoghegan


Commits

  1. Backport addition of rs_old_rel to rewriteheap's state.

  2. Perform a lot more sanity checks when freezing tuples.

  3. Revert bogus fixes of HOT-freezing bug

  4. Fix traversal of half-frozen update chains

  5. Fix freezing of a dead HOT-updated tuple

  6. During index build, check and elog (not just Assert) for broken HOT chain.

  7. Fix WAL replay of locking an updated tuple

  8. Change the way we mark tuples as frozen.