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 1iHtuf-0006tY-0V for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2019 18:08:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHtud-000635-Nr for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2019 18:08:43 +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 1iHtud-00062s-C2 for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2019 18:08:43 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1iHtub-0003Q4-3i for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2019 18:08:42 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 95ED25F79F; Tue, 8 Oct 2019 14:08:40 -0400 (EDT) Date: Tue, 8 Oct 2019 14:08:40 -0400 From: Stephen Frost To: Tom Lane Cc: Andrew Gierth , Justin Pryzby , pgsql-hackers@lists.postgresql.org Subject: Re: v12 and pg_restore -f- Message-ID: <20191008180840.GQ6962@tamriel.snowman.net> References: <20191006190839.GE18030@telsasoft.com> <28770.1570394593@sss.pgh.pa.us> <875zl11tla.fsf@news-spur.riddles.org.uk> <30069.1570396524@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="JXjKsASJwjFOkbFC" Content-Disposition: inline In-Reply-To: <30069.1570396524@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --JXjKsASJwjFOkbFC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Andrew Gierth writes: > > "Tom" =3D=3D Tom Lane writes: > > Tom> Perhaps we could change the back branches so that they interpret > > Tom> "-f -" as "write to stdout", but without enforcing that you use > > Tom> that syntax. >=20 > > We should definitely do that. I agree that this would be a reasonable course of action. Really, it should have always meant that... > > Tom> Alternatively, we could revert the v12 behavior change. On the > > Tom> whole that might be the wiser course. I do not think the costs and > > Tom> benefits of this change were all that carefully thought through. >=20 > > Failing to specify -d is a _really fricking common_ mistake for > > inexperienced users, who may not realize that the fact that they're > > seeing a ton of SQL on their terminal is not the normal result. > > Seriously, this comes up on a regular basis on IRC (which is why I > > suggested initially that we should do something about it). >=20 > No doubt, but that seems like a really poor excuse for breaking > maintenance scripts in a way that basically can't be fixed. Even > with the change suggested above, scripts couldn't rely on "-f -" > working anytime soon, because you couldn't be sure whether a > back-rev pg_restore had the update or not. Maintenance scripts break across major versions. We completely demolished everything around how recovery works, and some idea that you could craft up something easy that would work in a backwards-compatible way is outright ridiculous, so I don't see why we're so concerned about a change to how pg_restore works here. > The idea I'm leaning to after more thought is that we should change > *all* the branches to accept "-f -", but not throw an error if you > don't use it. Several years from now, we could put the error back in; > but not until there's a plausible argument that nobody is running > old versions of pg_restore anymore. No, I don't agree with this, at all. Thanks, Stephen --JXjKsASJwjFOkbFC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJdnNCoAAoJEO1sijiDR2RV2IMQAMXGUeF+8V8IQRXZZvMyo/uj wTRO/ORCZC6g6CYf0AgbQ7J6VTPIdR12fTYcaczr/N4mYb7+rp+QhliDndvOGPwC qDJ+wqqNpy2o3e4aq43kpKZV8hr9IiaTf+5n1GDWcoUtR2hd9Hi0X0BQTQAiFRTA gTKJMkgsJRNYjPhJUKqkO1csZyT+26FX9wLBBj3agONnGyDKzZcsoRUfjiNcQtLt asON/soU8TrFOOdeyA+Nkbzy6vQ7YgROCOlJCEIyV1XwZh8JPT6A6Wi7zIuXjUzH RgB9SnJpHKASNayUe29FAGSfvnyLogzNCg5piOa61ySHk45fjCtvRUR/V6vSyti6 s1uMuJQCx3g4lw1vPk0Oej6PxGhsHNdRwfhfKqcv42wM/tE50skjejXYA/eXoLt6 OhYNeHfXTHqgDFsUZvsSstkRxoAhWnHgGcCIgZE/iwAeCwykhdvX5MLz6YuueSLs eoFsYAXAZC0T3uZzLp9Pk+0Bvm1a6Qn05lKV/v/x4fPPKObRk10FNjoJDhABaXLz UWWQ6B7+W/HiaN5Sdzx7Y0QTUe6u5BIs8IAzxvsSXQJTkMApUlWJ4Pmj0+e+mpn1 oMTLbKki1ZrMnpm+8RZBYu8uMdH8/Jppzq0pVwpFMAYnJSZ3kCX5rbkaWwEfSZoP nXDhd+Prlfk/UY2UPsaV =LbM6 -----END PGP SIGNATURE----- --JXjKsASJwjFOkbFC--