From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: base backup client as auxiliary backend process
Date: Thu, 11 Jul 2019 17:28:27 -0400
Message-ID: <19575.1562880507@sss.pgh.pa.us> (raw)
In-Reply-To: <fb069b86-9a5f-915e-c8cf-d34fa5730805@2ndquadrant.com>
References: <61b8d18d-c922-ac99-b990-a31ba63cdcbb@2ndquadrant.com>
<CA+TgmoZ_ZGc4gqEEOOX-3bjMPBt4=E0wFYTytVDADJiuo=G7eQ@mail.gmail.com>
<24131.1562855803@sss.pgh.pa.us>
<CA+TgmoZsOQTvvcYAxxwinD5DZ2WC0mBL8oknwsT1dEX5xm0XaQ@mail.gmail.com>
<32146.1562875843@sss.pgh.pa.us>
<CA+TgmobT6+o9W-siFwK8JJb-uFRrCogf83bx=kxuZ-wfmobxow@mail.gmail.com>
<fb069b86-9a5f-915e-c8cf-d34fa5730805@2ndquadrant.com>
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2019-07-11 22:20, Robert Haas wrote:
>> On Thu, Jul 11, 2019 at 4:10 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> How's the postmaster to know that it's supposed to run pg_basebackup
>>> rather than start normally? Where will it get the connection information?
>>> Seem to need configuration data *somewhere*.
>>
>> Maybe just:
>>
>> ./postgres --replica='connstr' -D createme
> What you are describing is of course theoretically possible, but it
> doesn't really fit with how existing tooling normally deals with this,
> which is one of the problems I want to address.
I don't care for Robert's suggestion for a different reason: it presumes
that all data that can possibly be needed to set up a new replica is
feasible to cram onto the postmaster command line, and always will be.
An immediate counterexample is that's not where you want to be specifying
the password for a replication connection. But even without that sort of
security issue, this approach won't scale. It also does not work even a
little bit nicely for tooling in which the postmaster is not supposed to
be started directly by the user. (Which is to say, all postgres-service
tooling everywhere.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, robertmhaas@gmail.com
Subject: Re: base backup client as auxiliary backend process
In-Reply-To: <19575.1562880507@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox