Re: Latch for the WAL writer - further reducing idle wake-ups. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Latch for the WAL writer - further reducing idle wake-ups.
Date
Msg-id 530.1336520450@sss.pgh.pa.us
Whole thread Raw
In response to Re: Latch for the WAL writer - further reducing idle wake-ups.  (Peter Geoghegan <peter@2ndquadrant.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Latch for the WAL writer - further reducing idle wake-ups.
Next
From: Peter Geoghegan
Date:
Subject: Re: Latch for the WAL writer - further reducing idle wake-ups.