On Friday, May 11, 2012 07:20:26 PM Robert Haas wrote:
> On Fri, May 11, 2012 at 1:09 PM, Fujii Masao <masao.fu...@gmail.com> wrote:
> > Calling WalSndWakeup() while WALWriteLock is being held might cause
> > another performance degradation. No?
> 
> That definitely doesn't seem ideal - a lot of things can pile up
> behind WALWriteLock.  I'm not sure how big a problem it would be in
> practice, but we generally make a practice of avoiding sending signals
> while holding LWLocks whenever possible...
In my measurements on moderately powerful hardware I couldn't see any 
degradation on the primary - in fact the contrary, but the improvements were 
around 0.4% and I only tested 10min so its not exactly hard evidence. But I 
aggree its not ideal.
Its the only place though which knows whether its actually sensible to wakeup 
the walsender. We could make it return whether it wrote anything and do the 
wakeup at the callers. I count 4 different callsites which would be an 
annoying duplication but I don't really see anything better right now.

Better Ideas?

Andres

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to