pgsql: Fix the truncation logic of the OldSerXid SLRU mechanism. We can

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix the truncation logic of the OldSerXid SLRU mechanism. We can
Date: 2011-06-09 18:44:46
Message-ID: E1QUkDm-0001Hl-MT@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix the truncation logic of the OldSerXid SLRU mechanism. We can't pass
SimpleLruTruncate() a page number that's "in the future", because it will
issue a warning and refuse to truncate anything. Instead, we leave behind
the latest segment. If the slru is not needed before XID wrap-around, the
segment will appear as new again, and not be cleaned up until it gets old
enough again. That's a bit unpleasant, but better than not cleaning up
anything.

Also, fix broken calculation to check and warn if the span of the OldSerXid
SLRU is getting too large to fit in the 64k SLRU pages that we have
available. It was not XID wraparound aware.

Kevin Grittner and me.

Branch
------
master

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

Modified Files
--------------
src/backend/storage/lmgr/predicate.c | 62 +++++++++++++++++++++++----------
1 files changed, 43 insertions(+), 19 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2011-06-09 20:08:20 pgsql: Translation updates for 9.1beta2
Previous Message Bruce Momjian 2011-06-09 18:33:24 pgsql: Pgindent run before 9.1 beta2.