Skip site navigation (1) Skip section navigation (2)

pgsql: Simplify and improve ProcessStandbyHSFeedbackMessage logic.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Simplify and improve ProcessStandbyHSFeedbackMessage logic.
Date: 2011-10-20 23:44:32
Message-ID: E1RH2Ho-0006Li-Ny@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Simplify and improve ProcessStandbyHSFeedbackMessage logic.

There's no need to clamp the standby's xmin to be greater than
GetOldestXmin's result; if there were any such need this logic would be
hopelessly inadequate anyway, because it fails to account for
within-database versus cluster-wide values of GetOldestXmin.  So get rid of
that, and just rely on sanity-checking that the xmin is not wrapped around
relative to the nextXid counter.  Also, don't reset the walsender's xmin if
the current feedback xmin is indeed out of range; that just creates more
problems than we already had.  Lastly, don't bother to take the
ProcArrayLock; there's no need to do that to set xmin.

Also improve the comments about this in GetOldestXmin itself.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d1d094e4cf7d80cb2b4f68b5e8ce11aa9ebcbf3c

Modified Files
--------------
src/backend/replication/walsender.c |  105 ++++++++++++++++-------------------
src/backend/storage/ipc/procarray.c |   50 ++++++++++------
2 files changed, 79 insertions(+), 76 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2011-10-21 13:13:57
Subject: pgsql: Fix DROP OPERATOR FAMILY IF EXISTS.
Previous:From: Tom LaneDate: 2011-10-20 19:44:31
Subject: pgsql: Fix memory leak in tab completion.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group