Re: Final Thoughts for 8.3 on LWLocking and Scalability

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Final Thoughts for 8.3 on LWLocking and Scalability
Date: 2007-09-11 14:44:00
Message-ID: 1189521840.4281.480.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 2007-09-11 at 10:21 -0400, Tom Lane wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> > 1. The ProcArrayLock is acquired Exclusive-ly by only one remaining
> > operation: XidCacheRemoveRunningXids(). Reducing things to that level is
> > brilliant work, Florian and Tom.
>
> It would be brilliant if it were true, but it isn't. Better look again.

On the more detailed explanation, I say "in normal operation".

My analytical notes attached to the original post show ProcArrayLock is
acquired exclusively during backend start, exit and while making a
prepared (twophase) commit. So yes, it is locked Exclusively in other
places, but they happen rarely and they actually add/remove procs from
the array, so its unlikely anything can change there anyhow.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-09-11 14:49:41 Re: What is happening on buildfarm member dugong
Previous Message Peter Eisentraut 2007-09-11 14:39:45 pg_dump and money type

Browse pgsql-patches by date

  From Date Subject
Next Message Pavan Deolasee 2007-09-11 14:47:19 Re: HOT patch - version 15
Previous Message Tom Lane 2007-09-11 14:36:57 Re: HOT patch - version 15