Re: Old row version in hot chain become visible after a freeze

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>, "Wood, Dan" <hexpert@amazon.com>, "pgsql-bugs@postgresql.org" <pgsql-bugs@postgresql.org>, Andres Freund <andres@anarazel.de>
Date: 2017-09-06T13:27:38Z
Lists: pgsql-bugs

Attachments

Another thing is that if you're going through heap_copy_data, the tuple
is only checked for DEAD, not RECENTLY_DEAD.  Maybe there is no bug here
but I'm not sure yet.

I attach the patch as I have it now -- mostly comment tweaks, but also
the change to not mark page as all-frozen when we skip freezing a
recently read tuple.  I also renamed the test case, because I think it
may be possible to reach the problem code without involving a multixact.
Haven't tried too hard though.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Fix freezing of a dead HOT-updated tuple

  2. Fix potential data corruption during freeze

  3. Clarify the contract of partition_rbound_cmp().