Re: Reading recovery.conf earlier

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: Reading recovery.conf earlier
Date: 2009-12-05 21:07:01
Message-ID: 1260047221.13774.41968.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2009-12-05 at 15:43 -0500, Tom Lane wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> > I'm planning to read recovery.conf earlier in the startup process, so we
> > can make a few things more "recovery aware". It's a nice-to-have only.
>
> Say what? It's read at the beginning already.

Before the beginning then. :-)

Two reasons to move it earlier in the startup sequence of the server

* Some data structures are only required in HS mode. We don't know we're
in HS mode until we created shared memory and started the Startup
process. If we knew ahead of time, we could skip adding the structures.

* Some things in postgresql.conf need to be overridden in HS mode, for
example default_transaction_read_only = false. Again, we don't know
we're in HS mode until later.

So I would want to read recovery.conf before we read postgresql.conf

Also, AFAIK, it's not easily possible to have dependencies between
settings in postgresql.conf, unless the dependencies are expressed by
ordering the dependent parameters in alphabetic order. So putting the
parameters in postgresql.conf wouldn't help much.

--
Simon Riggs www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-12-05 21:08:03 Re: PostgreSQL Release Support Policy
Previous Message Heikki Linnakangas 2009-12-05 20:56:56 Re: Hot standby, misc issues