Re: Reading recovery.conf earlier

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

On Mon, 2009-12-07 at 10:13 +0200, Heikki Linnakangas wrote:
> Simon Riggs wrote:
> > What postgresql.conf already does is read file separately in each
> > process, so no data passing.
>
> No it doesn't. Postmaster reads the file once, and backends inherit the
> values at fork(). In EXEC_BACKEND case, postmaster writes all the
> non-default values to a separate file, which the child process reads at
> startup.

As I mentioned, the difficulty is always the Windows case. I wasn't
aware we wrote a separate file in that case, so that does potentially
effect my thinking.

> Reading the file separately in each process would cause trouble with
> PGC_POSTMASTER params. All backends must agree on their values.

Looking at the parameters in recovery.conf I don't believe they would
cause problems if read twice. So I think reading file twice would still
be simplest way forwards.

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.

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-12-07 08:38:21 Re: Hot standby, recent changes
Previous Message Hitoshi Harada 2009-12-07 08:14:53 Re: YAML Was: CommitFest status/management