Re: unite recovery.conf and postgresql.conf - Mailing list pgsql-hackers

From Tom Lane
Subject Re: unite recovery.conf and postgresql.conf
Date
Msg-id 2434.1316971107@sss.pgh.pa.us
Whole thread Raw
In response to Re: unite recovery.conf and postgresql.conf  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: unite recovery.conf and postgresql.conf
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sep 24, 2011, at 1:04 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I don't exactly buy this argument.  If postgresql.conf is hard to
>> machine-edit, why is recovery.conf any easier?

> Because you generally just write a brand-new file, without worrying
> about preserving existing settings. You aren't really editing at all,
> just writing.

If that's all the requirement is, it's trivial to implement.

1. Write your-random-configuration-settings into recovery.conf (or any
other file name you choose ... something named after your tool would be
a better idea).

2. Temporarily append "include recovery.conf" to the end of
postgresql.conf.  Restart server.

3. When done, remove "include recovery.conf" from the end of
postgresql.conf.

The hard cases involve merging user-supplied and tool-supplied settings,
but "let's overwrite recovery.conf in toto" never would have been able
to handle such cases either.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: unite recovery.conf and postgresql.conf
Next
From: Joshua Berkus
Date:
Subject: Re: unite recovery.conf and postgresql.conf