pgsql: Fix xmin/xmax horizon computation during logical decoding initia

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix xmin/xmax horizon computation during logical decoding initia
Date: 2014-11-13 19:43:52
Message-ID: E1Xp0J6-0000XV-Gx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix xmin/xmax horizon computation during logical decoding initialization.

When building the initial historic catalog snapshot there were
scenarios where snapbuild.c would use incorrect xmin/xmax values when
starting from a xl_running_xacts record. The values used were always a
bit suspect, but happened to be correct in the easy to test
cases. Notably the values used when the the initial snapshot was
computed while no other transactions were running were correct.

This is likely to be the cause of the occasional buildfarm failures on
animals markhor and tick; but it's quite possible to reproduce
problems without CLOBBER_CACHE_ALWAYS.

Backpatch to 9.4, where logical decoding was introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5a2c184058c51a41b855b9e824102d1395402ffa

Modified Files
--------------
src/backend/replication/logical/snapbuild.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2014-11-13 19:44:01 pgsql: Fix and improve cache invalidation logic for logical decoding.
Previous Message Heikki Linnakangas 2014-11-13 18:18:39 pgsql: Fix race condition between hot standby and restoring a full-page