Re: Hot Standby on git - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot Standby on git
Date
Msg-id 1254768589.4691.249.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Hot Standby on git  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Privileges and inheritance
Next
From: Tom Lane
Date:
Subject: Re: dblink memory leak