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

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

Heikki Linnakangas wrote:

> I'm getting a bunch of warnings on Windows related to this:

>> .\src\backend\storage\lmgr\predicate.c(768): warning C4307: '+' :
>> integral constant overflow

The part of the expression which is probably causing this:

(MaxTransactionId + 1) / OLDSERXID_ENTRIESPERPAGE - 1

Which I fear may not be getting into overflow which will not do the
right thing even where there is no warning. :-(

Would it be safe to assume that integer division would do the right
thing if we drop both of the "off by one" adjustments and use?:

MaxTransactionId / OLDSERXID_ENTRIESPERPAGE

-Kevin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-07-08 12:40:00 Re: Latch implementation that wakes on postmaster death on both win32 and Unix
Previous Message Florian Pflug 2011-07-08 10:58:53 Re: Latch implementation that wakes on postmaster death on both win32 and Unix