On Mon, 2009-10-05 at 10:19 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
> > I don't see how that helps at all. The objective of lock counters was to
> > know if we can skip acquiring an LWlock on all lock partitions. This
> > change keeps the lock counters yet acquires the locks we were trying to
> > avoid. This change needs some justification since it is not a bug fix.
>
> [ scratches head ... ] Why is hot standby messing with this sort of
> thing at all? It sounds like a performance optimization that should
> be considered separately, and *later*.
Possibly.
We have 3 suggested approaches:
* Avoid taking LockPartition locks while we get info for Hot Standby
during normal running, by means of a ref counting scheme (Simon)
* Take the locks and implement a ref counting scheme (Heikki)
* Take the locks, worry later (Tom)
The middle ground seems pointless to me.
I'm happy to go with simple lock-everything-for-now but it's pretty
clear its going to be a annoying performance hit. If we do that we
should put in a parameter to turn on/off so that those who will never
use Hot Standby can avoid this completely.
I'll wait for Heikki's thoughts before implementing anything.
-- Simon Riggs www.2ndQuadrant.com