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 1hfUQD-000190-3W for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2019 19:14:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hfUQB-0000vp-Uh for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Jun 2019 19:14:31 +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 1hfUQB-0000sI-IB for pgsql-hackers@lists.postgresql.org; Mon, 24 Jun 2019 19:14:31 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hfUQ9-0004iS-85 for pgsql-hackers@postgresql.org; Mon, 24 Jun 2019 19:14:30 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 7BF635F7B1; Mon, 24 Jun 2019 15:14:29 -0400 (EDT) Date: Mon, 24 Jun 2019 15:14:29 -0400 From: Stephen Frost To: Alvaro Herrera Cc: Robert Haas , Amit Kapila , Ian Barwick , "pgsql-hackers@postgresql.org" Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions Message-ID: <20190624191429.GA2480@tamriel.snowman.net> References: <20190624190625.GA10524@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1uQmAhkvaZVrm9dD" Content-Disposition: inline In-Reply-To: <20190624190625.GA10524@alvherre.pgsql> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --1uQmAhkvaZVrm9dD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Alvaro Herrera (alvherre@2ndquadrant.com) wrote: > On 2019-Jun-24, Robert Haas wrote: >=20 > > On Sat, Jun 22, 2019 at 5:13 PM Stephen Frost wrot= e: > > > All that said, whatever code it is that we write for pg_basebackup to= do this properly should go into our client side library, so other tools ca= n leverage that and avoid having to write it themselves. > >=20 > > That is probably only going to help people who are writing in C (or > > maybe some close family member) and a lot of tools for managing > > PostgreSQL will be written in scripting languages. >=20 > But we already have ALTER SYSTEM, so why do we need to write it again? > You just need to check whether the system is running: if it is, connect > and do "ALTER SYSTEM". If it isn't, do `echo ALTER SYSTEM | postgres > --single`. Maybe we can embed smarts to do that in, say, pg_ctl; then > everybody has access to it. While I'm not against adding some kind of support like that if we feel like we really need it, I tend to think that just having it in libpgcommon would be enough for most tool authors to use.. Thanks, Stephen --1uQmAhkvaZVrm9dD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdESEVAAoJEO1sijiDR2RVDBAQAJrMSSDBQ2Yu3N5IEmOXAYR5 IWzRteJeL+AgKkYSgGhtYhmiCJx++aYHSDjN7hp4FhbBv9zmoFfGPpsanXDHmP4+ 2FXCIvx0p5lYJX6XI4ocW0ASplhOZ4FjVXdNbO51VClrT/AFGP8ymakctKDeXG/p +PjW8GBH+thVTo2BYQhyVLeOF+B44JYhFc/ZYDNr6S2Zjqk9G6yiLUJ2nhCcjXj7 1Lv4Yc8WXK4hiILu0k9oSHihcfOcAzbto6H/OkJSnhlUjJmJAFyvmq+7h4XGhQ0T i80vVtP3felHB1nHvQ4+Ia71STqlIr8nBgYhQALRX6UWBxhaqKHvEDpHuWWr2xkd DNsb9DO/BK3I8W17qFcP2/GHeT2T5i4OfvniG+Jy6zsGKmQsrwypLiKXmXWdAOmN Y2/ZGj0QZ2vYZZjWuK00oOrDdy3w8F32zSvceQMQJ8sr2V6Vkkf38Uqg8kB4QFWo DtCQ3Xwrh9Z5CBopjEt6cIQWLKa34bmnIJL+CO6dEPLKu94cgiIRX+2fjhPZRl6Z Rrn1bKfUCuQkr+WKZE/Du8wMwoqUyPtYn2QREm3BYs5pjpXPCDfXHblNFIRAphZk kVrc9WfYGVzmc2tRro4+jGILrw1JeO5KvepgrVe5mUe9yCT9yDSBLIM3/M3nyAPd P3u8a62zZpMrIamHXa6w =Tcip -----END PGP SIGNATURE----- --1uQmAhkvaZVrm9dD--