Re: Reading recovery.conf earlier - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Reading recovery.conf earlier
Date
Msg-id 1260197443.3665.11.camel@ebony
Whole thread Raw
In response to Re: Reading recovery.conf earlier  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Reading recovery.conf earlier
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Adding support for SE-Linux security
Next
From: Roberto Mello
Date:
Subject: Re: New PostgreSQL Committers