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 1iHDsI-0002b7-2e for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Oct 2019 21:15:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iHDsG-0002OK-Ty for pgsql-hackers@arkaria.postgresql.org; Sun, 06 Oct 2019 21:15:28 +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 1iHDsG-0002O3-DR for pgsql-hackers@lists.postgresql.org; Sun, 06 Oct 2019 21:15:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iHDsE-00053n-2g for pgsql-hackers@lists.postgresql.org; Sun, 06 Oct 2019 21:15:27 +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 x96LFOkn030070; Sun, 6 Oct 2019 17:15:24 -0400 From: Tom Lane To: Andrew Gierth cc: Justin Pryzby , pgsql-hackers@lists.postgresql.org Subject: Re: v12 and pg_restore -f- In-reply-to: <875zl11tla.fsf@news-spur.riddles.org.uk> References: <20191006190839.GE18030@telsasoft.com> <28770.1570394593@sss.pgh.pa.us> <875zl11tla.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Sun, 06 Oct 2019 22:02:49 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30068.1570396524.1@sss.pgh.pa.us> Date: Sun, 06 Oct 2019 17:15:24 -0400 Message-ID: <30069.1570396524@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > "Tom" == 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. > We should definitely do 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. > 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). 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. 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. regards, tom lane