On Mon, 2009-12-07 at 19:26 +0900, Fujii Masao wrote:
> On Mon, Dec 7, 2009 at 5:28 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> > If you really think that changing the file is a possibility between
> > processes reading them, then I would just take a full temp copy of the
> > file, read it in postmaster, read it in startup, then delete temp file.
>
> This seems more robust because processes which are started long after
> postmaster has started might use recovery.conf in the future (e.g.,
> walreceiver in SR, read-only backends).
How does this sound?
At startup we will delete recovery.conf.running, if it exists.
At startup recovery.conf will be copied to recovery.conf.running, which
will be the file read by any additional processes that read
recovery.conf during this execution. The permissions on the file will
then be set to read-only.
-- Simon Riggs www.2ndQuadrant.com