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

Re: sinval synchronization considered harmful

From: Noah Misch <noah(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: sinval synchronization considered harmful
Date: 2011-07-21 22:43:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, Jul 20, 2011 at 09:46:33PM -0400, Robert Haas wrote:
> Profiling this combination of patches reveals that there is still some
> pretty ugly spinlock contention on sinval's msgNumLock.  And it occurs
> to me that on x86, we really don't need this lock ... or
> SInvalReadLock ... or a per-backend mutex.  The whole of
> 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

Noah Misch          
PostgreSQL Development, 24x7 Support, Training & Services

In response to


pgsql-hackers by date

Next:From: Dan PortsDate: 2011-07-21 22:44:59
Subject: Re: sinval synchronization considered harmful
Previous:From: Christopher BrowneDate: 2011-07-21 22:30:48
Subject: Re: storing TZ along timestamps

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