Re: Proposal for changes to recovery.conf API
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Fujii Masao <masao.fujii@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>,
Josh Berkus <josh@agliodbs.com>, Magnus Hagander <magnus@hagander.net>, Andres Freund <andres@anarazel.de>, Abhijit Menon-Sen <ams@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-02-27T01:07:56Z
Lists: 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