Re: Re: [COMMITTERS] pgsql: Checkpointer starts before bgwriter to avoid missing fsync reque - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Re: [COMMITTERS] pgsql: Checkpointer starts before bgwriter to avoid missing fsync reque
Date
Msg-id 23635.1338557357@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Checkpointer starts before bgwriter to avoid missing fsync reque  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Re: [COMMITTERS] pgsql: Checkpointer starts before bgwriter to avoid missing fsync reque  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> On 1 June 2012 08:55, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> On 01.06.2012 10:28, Simon Riggs wrote:
>>> Checkpointer starts before bgwriter to avoid missing fsync requests.
>>> Noted while testing Hot Standby startup.

>> The processes are just forked and it will take some time for them to
>> initialize. Isn't there still a race condition, where the bgwriter starts up
>> first, and you still miss fsync requests?

> Possibly...

> How do we handle that same situation if the check pointer crashes?

Surely that commit is useless.  Fsync requests go into a queue in shared
memory, which had better have been set up by the postmaster.  There is
no requirement that the receiving process exist before somebody can put
a request into the queue.  If the queue overflows, the requestor has to
take care of the fsync itself, but that is independent of whether the
checkpointer is running yet.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile
Next
From: Merlin Moncure
Date:
Subject: Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile