Re: base backup client as auxiliary backend process
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-11T21:28:27Z
Lists: pgsql-hackers
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
Commits
-
Factor out InitControlFile() from BootStrapXLOG()
- 79c2385915dd 13.0 landed
-
Reformat code comment
- 9745f93afc56 13.0 landed
-
pg_resetwal: Rename function to avoid potential conflict
- 5f1b8260af96 13.0 landed
-
Expose PQbackendPID() through walreceiver API
- ee4ac46c8eb2 13.0 landed
-
walreceiver uses a temporary replication slot by default
- 329730827848 13.0 landed
-
Make lsn argument of walrcv_create_slot() optional
- c67a55da4ea0 13.0 landed
-
More precise errors from initial pg_control check
- b85e43feb3e8 13.0 landed