Re: Re: [COMMITTERS] pgsql: Adjust OLDSERXID_MAX_PAGE based on BLCKSZ.

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>,<rhaas(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Adjust OLDSERXID_MAX_PAGE based on BLCKSZ.
Date: 2011-07-08 13:45:46
Message-ID: 4E16C3BA020000250003F0F3@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> On 08.07.2011 15:22, Kevin Grittner wrote:

>> MaxTransactionId / OLDSERXID_ENTRIESPERPAGE
>
> Hmm, that seems more correct to me anyway. We are trying to
> calculate which page xid MaxTransactionId would be stored on, if
> the SLRU didn't have a size limit. You calculate that with simply
> MaxTransactionId / OLDSERXID_ENTRIESPERPAGE.

Good point. The old calculation was finding the page before the
page which would contain the first out-of-bound entry. As long as
these numbers are all powers of 2 that's the same, but (besides the
overflow issue) it's not as clear.

On the off chance that this saves someone any work, trivial patch
attached.

-Kevin

Attachment Content-Type Size
ssi-maxpage-rounding.patch text/plain 751 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-07-08 13:50:44 Re: Full GUID support
Previous Message Martin Pihlak 2011-07-08 13:36:00 Re: libpq SSL with non-blocking sockets