From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Hot Standby 0.2.1 |
Date: | 2009-09-25 10:28:08 |
Message-ID: | 1253874488.4449.605.camel@ebony.2ndQuadrant |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2009-09-25 at 13:14 +0300, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > On Wed, 2009-09-23 at 19:07 +0300, Heikki Linnakangas wrote:
> >
> >> Rather than keep the numHeldLocks counters per-proc in proc array, I
> >> think it would be simpler to have a single (or one per lock partition)
> >> counter in shared memory in lock.c. It's just an optimization to make it
> >> faster to find out that there is no loggable AccessExclusiveLocks in the
> >> system, so it really rather belongs into the lock manager.
> >
> > What lock would protect that value? The whole purpose is to avoid taking
> > the LockMgrLocks and to give something that is accessible by the locks
> > already held by GetRunningTransactionData().
>
> The lock partition lock (so we really need one counter per partition, a
> single counter would need additional locking). We're already holding
> that in LockAcquire/LockRelease when we need to increment/decrement the
> counter.
Again: The whole purpose is to avoid taking those locks. Why would we
put something behind a lock we are trying to avoid taking?
--
Simon Riggs www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2009-09-25 10:31:17 | Docs build error in alpha1 |
Previous Message | Fujii Masao | 2009-09-25 10:27:14 | Re: Streaming Replication patch for CommitFest 2009-09 |