Re: BUG #5915: OldSerXidAdd inflates pg_serial too much

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "YAMAMOTO Takashi" <yamt(at)mwd(dot)biglobe(dot)ne(dot)jp>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5915: OldSerXidAdd inflates pg_serial too much
Date: 2011-03-04 20:33:40
Message-ID: 4D70F844020000250003B4C0@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)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.

I'll look at this some more to see if I can spot something I'm
missing, but if you see something to indicate it's not working as I
describe above, please point me in the right direction.

-Kevin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Heikki Linnakangas 2011-03-04 20:42:37 Re: BUG #5915: OldSerXidAdd inflates pg_serial too much
Previous Message Heikki Linnakangas 2011-03-04 20:24:11 Re: BUG #5915: OldSerXidAdd inflates pg_serial too much