Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlgcE-0003Gn-A7 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jul 2019 21:28:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlgcD-0005ox-59 for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jul 2019 21:28:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlgcC-0005mg-Pa for pgsql-hackers@lists.postgresql.org; Thu, 11 Jul 2019 21:28:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlgcA-00053G-Jn for pgsql-hackers@postgresql.org; Thu, 11 Jul 2019 21:28:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6BLSRqL019576; Thu, 11 Jul 2019 17:28:27 -0400 From: Tom Lane To: Peter Eisentraut cc: Robert Haas , pgsql-hackers Subject: Re: base backup client as auxiliary backend process In-reply-to: References: <61b8d18d-c922-ac99-b990-a31ba63cdcbb@2ndquadrant.com> <24131.1562855803@sss.pgh.pa.us> <32146.1562875843@sss.pgh.pa.us> Comments: In-reply-to Peter Eisentraut message dated "Thu, 11 Jul 2019 22:56:31 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19574.1562880507.1@sss.pgh.pa.us> Date: Thu, 11 Jul 2019 17:28:27 -0400 Message-ID: <19575.1562880507@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > On 2019-07-11 22:20, Robert Haas wrote: >> On Thu, Jul 11, 2019 at 4:10 PM Tom Lane 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