Re: sinval synchronization considered harmful - Mailing list pgsql-hackers

From Noah Misch
Subject Re: sinval synchronization considered harmful
Date
Msg-id 20110725222405.GA8255@tornado.leadboat.com
Whole thread Raw
In response to Re: sinval synchronization considered harmful  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: sinval synchronization considered harmful
List pgsql-hackers
On Fri, Jul 22, 2011 at 03:54:03PM -0400, Robert Haas wrote:
> On Fri, Jul 22, 2011 at 3:28 PM, Noah Misch <noah@2ndquadrant.com> wrote:
> > This is attractive, and I don't see any problems with it.  (In theory, you could
> > hit a case where the load of resetState gives an ancient "false" just as the
> > counters wrap to match.  Given that the wrap interval is 1000000x as long as the
> > reset interval, I'm not worried about problems on actual silicon.)
> 
> It's actually 262,144 times as long - see MSGNUMWRAPAROUND.

Ah, so it is.

> It would be pretty easy to eliminate even the theoretical possibility
> of a race by getting rid of resetState altogether and using nextMsgNum
> = -1 to mean that.  Maybe I should go ahead and do that.

Seems like a nice simplification.

-- 
Noah Misch                    http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: write scalability
Next
From: Jim Nasby
Date:
Subject: Re: storing TZ along timestamps