Re: WalSndWakeup() and synchronous_commit=off
От | Andres Freund |
---|---|
Тема | Re: WalSndWakeup() and synchronous_commit=off |
Дата | |
Msg-id | 201205112001.17903.andres@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: WalSndWakeup() and synchronous_commit=off (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: WalSndWakeup() and synchronous_commit=off
|
Список | pgsql-hackers |
On Friday, May 11, 2012 07:20:26 PM Robert Haas wrote: > On Fri, May 11, 2012 at 1:09 PM, Fujii Masao <masao.fujii@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
В списке pgsql-hackers по дате отправления: