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

2011-07-08 Thread Robert Haas
On Fri, Jul 8, 2011 at 11:57 AM, Tom Lane wrote: > "Kevin Grittner" writes: >> Tom Lane wrote: >>> At this point I think the actual choice we'd have is to abandon >>> beta3 and try again next week with a beta4.  I'm trying to figure >>> out whether this bug is serious enough to warrant that, but

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

2011-07-08 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> At this point I think the actual choice we'd have is to abandon >> beta3 and try again next week with a beta4. I'm trying to figure >> out whether this bug is serious enough to warrant that, but it's >> not clear to me. > I changed the definition to

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

2011-07-08 Thread Kevin Grittner
Tom Lane wrote: > Robert Haas writes: >> On Fri, Jul 8, 2011 at 10:57 AM, Heikki Linnakangas >> wrote: >>> So if MaxTransactionId+1 overflows to zero, OLDSERXID_MAX_PAGE >>> becomes -1. Or a very high value, if the result of that is >>> unsigned, as at least MSVC seems to interpret it given the

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

2011-07-08 Thread Tom Lane
Robert Haas writes: > On Fri, Jul 8, 2011 at 10:57 AM, Heikki Linnakangas > wrote: >> So if MaxTransactionId+1 overflows to zero, OLDSERXID_MAX_PAGE becomes -1. >> Or a very high value, if the result of that is unsigned, as at least MSVC >> seems to interpret it given the other warning I got. If

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

2011-07-08 Thread Robert Haas
On Fri, Jul 8, 2011 at 10:57 AM, Heikki Linnakangas wrote: > So if MaxTransactionId+1 overflows to zero, OLDSERXID_MAX_PAGE becomes -1. > Or a very high value, if the result of that is unsigned, as at least MSVC > seems to interpret it given the other warning I got. If it's interpreted as > a larg

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

2011-07-08 Thread Kevin Grittner
Tom Lane wrote: > So, what are the consequences if a compiler allows the expression > to overflow to zero? Does this mean that beta3 is dangerously > broken? The risk to anyone not using serializable transactions is most definitely zero. I've been running with this patch in my daily tests (i

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

2011-07-08 Thread Heikki Linnakangas
On 08.07.2011 17:29, Tom Lane wrote: Heikki Linnakangas writes: On 08.07.2011 15:22, Kevin Grittner wrote: 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

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

2011-07-08 Thread Heikki Linnakangas
On 08.07.2011 16:45, Kevin Grittner wrote: Heikki Linnakangas 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 S

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

2011-07-08 Thread Tom Lane
Heikki Linnakangas writes: > On 08.07.2011 15:22, Kevin Grittner wrote: >> 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

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

2011-07-08 Thread Kevin Grittner
Heikki Linnakangas 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 ca

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

2011-07-08 Thread Heikki Linnakangas
On 08.07.2011 15:22, Kevin Grittner wrote: 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:

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

2011-07-08 Thread Kevin Grittner
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_ENTR