Re: Reading recovery.conf earlier

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reading recovery.conf earlier
Date: 2009-12-07 14:50:43
Message-ID: 1260197443.3665.11.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Roberto Mello 2009-12-07 14:58:32 Re: New PostgreSQL Committers
Previous Message Bruce Momjian 2009-12-07 14:48:59 Re: Adding support for SE-Linux security