Re: [HACKERS] Proposal for changes to recovery.conf API - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] Proposal for changes to recovery.conf API
Date
Msg-id CAB7nPqQ-Grduc-0WSsK4-VXo+1CB=yDS9NMU0NEp+c+ffnz0UQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Proposal for changes to recovery.conf API  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Sun, Feb 26, 2017 at 5:56 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sat, Feb 25, 2017 at 7:28 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> - pg_basebackup -R generates recovery.conf.auto.
>
> Does anything cause that file to get read?
>
> Wouldn't it be better to just append to postgresql.conf.auto?

Yeah, that would be cleaner than having the backend look for an extra
hardcoded path. Looking at pg_basebackup.c, actually it would not be
difficult to append data to an existing file: look for the file in the
tar stream, and when it is here save its content for later and bypass
it. Once the tar stream is written, just use the data saved previously
and append the parameters at the end of it.
-- 
Michael



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] SerializedSnapshotData alignment
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] IF (NOT) EXISTS in psql-completion