Skip site navigation (1) Skip section navigation (2)

Re: sinval synchronization considered harmful

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Noah Misch <noah(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: sinval synchronization considered harmful
Date: 2011-07-22 01:19:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Jul 21, 2011 at 6:43 PM, Noah Misch <noah(at)2ndquadrant(dot)com> wrote:
>> On Wed, Jul 20, 2011 at 09:46:33PM -0400, Robert Haas wrote:
>>> SIGetDataEntries() can pretty easily be made lock-free.  The only real
>>> changes that seem to be are needed are (1) to use a 64-bit counter, so
>>> you never need to decrement

>> On second thought, won't this be inadequate on 32-bit systems, where updating
>> the 64-bit counter produces two stores?  You must avoid reading it between those stores.

> Now that is a potentially big problem.

Could we do something similar to the xxid hacks?  That is, we have a lot
of counters that should be fairly close to each other, so we store only
the low-order 32 bits of each notional value, and separately maintain a
common high-order word.  You probably would need some additional
overhead each time the high-order word bumps, but that's reasonably

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2011-07-22 02:24:41
Subject: libedit memory stomp is apparently fixed in OS X Lion
Previous:From: Josh KupershmidtDate: 2011-07-22 01:17:28
Subject: Re: psql: bogus descriptions displayed by \d+

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group