Re: Latch for the WAL writer - further reducing idle wake-ups.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <peter@2ndquadrant.com>
Cc: Magnus Hagander <magnus@hagander.net>,
Robert Haas <robertmhaas@gmail.com>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2012-05-08T23:40:50Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make bgwriter sleep longer when it has no work to do, to save electricity.
- 6d90eaaa89a0 9.2.0 cited
Peter Geoghegan <peter@2ndquadrant.com> writes: > On 8 May 2012 22:35, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Now that I've actually read the patch, rather than just responding to >> your description of it, I find myself entirely unhappy with the proposed >> changes in the walwriter's sleep logic. You have introduced race >> conditions (it is NOT okay to reset the latch somewhere below the top of >> the loop) > Yes, there is some checking of flags before the potential ResetLatch() > call, which may be acted on. The code there is almost identical to > that of the extant bgwriter code. Um, yes, I noticed that shortly after sending my previous message. I'm pretty unhappy about the current state of the bgwriter loop, too. I rather wonder whether that coding explains the "postmaster failed to shut down" errors that we've been seeing lately in the buildfarm. Not noticing a shutdown signal promptly would go a long way towards explaining that. regards, tom lane