From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5915: OldSerXidAdd inflates pg_serial too much
Date: Fri, 04 Mar 2011 22:42:37 +0200
Message-ID: <4D714EBD.9020409@enterprisedb.com> (raw)
In-Reply-To: <4D70F844020000250003B4C0@gw.wicourts.gov>
References: <201103041241.p24CfDZV063217@wwwmaster.postgresql.org>
<4D70E897020000250003B4B8@gw.wicourts.gov>
<4D714A6B.3030506@enterprisedb.com>
<4D70F844020000250003B4C0@gw.wicourts.gov>
On 04.03.2011 22:33, Kevin Grittner wrote:
> Heikki Linnakangas<heikki.linnakangas@enterprisedb.com> wrote:
>
>> Hmm, if I'm reading that function correctly, it makes sure that
>> when headPage< 0 (which implies that the SLRU has not been used
>> since startup, right? )
>
> No, look at the bottom of OldSerXidSetActiveSerXmin() -- cleanup of
> segments is done incrementally, but when it finds it has cleaned up
> *everything* it sets headPage = -1. I believe that should only
> happen when the xmin has moved past the end of the segment.
>
>> it zeroes out the whole SLRU file, not only the currently active
>> region.
>
> That's not the intent. If it's doing that, it's accidental. It is
> trying to zero from the start of a segment, if a new one is needed.
Sorry, I was not entirely clear. It clears all pages from the start of
the segment, up to the last currently active page, even if the active
region from tailXid to headXid only spans a couple of pages somewhere in
the middle of the segment. It seems pointless to clear the pages in the
beginning of the segment in that case.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, Kevin.Grittner@wicourts.gov, yamt@mwd.biglobe.ne.jp
Subject: Re: BUG #5915: OldSerXidAdd inflates pg_serial too much
In-Reply-To: <4D714EBD.9020409@enterprisedb.com>
References: <201103041241.p24CfDZV063217@wwwmaster.postgresql.org> <4D70E897020000250003B4B8@gw.wicourts.gov> <4D714A6B.3030506@enterprisedb.com> <4D70F844020000250003B4C0@gw.wicourts.gov> <4D714EBD.9020409@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox