Re: v12 and pg_restore -f-

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, imai(dot)yoshikazu(at)fujitsu(dot)com, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: v12 and pg_restore -f-
Date: 2019-10-17 15:30:06
Message-ID: 20191017153006.GA3599@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Oct 17, 2019 at 12:24:10PM +0200, Tom Lane wrote:
> Alternatively, we could revoke the requirement to use "-f -" in 12,
> and wait a couple releases before enforcing it. The fundamental
> problem here is that we tried to go from "-f - doesn't work" to
> "you must use -f -" with no grace period where "-f - is optional".
> In hindsight that was a bad idea.

I'm going to make an argument in favour of keeping the enforcement of -f- in
v12.

If there's no enforcement, I don't know if many people would naturally start to
use -f-, which means that tools which need to work across a wide range of
(minor) versions may never confront this until it's enforced in v14/v15, at
which point we probably end up revisiting the whole thing again.

Failing pg_restore forces people to confront the new/different behavior. If we
defer failing for 2 years, it probably just means it'll be an issue again 2
years from now.

However, it's still an issue if (old) back branches (like 11.5) don't support
-f-, and I think the differing behavior should be called out in the v12 release
notes, as succinctly as possible.

Also, I'm taking the opportunity to correct myself, before someone else does:

On Wed, Oct 16, 2019 at 02:28:40PM -0500, Justin Pryzby wrote:
> And vendors (something like pgadmin) will end up "having to" write to a file
> to be portable, or else check the full version, not just the major version.

I take back that part .. before v12, they'd get stdout by not specifying -f,
and since 12.0 they'd get stdout with -f-. No need to check the minor version,
since the "need to" specify -f- wouldn't be backpatched, of course.

Justin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-10-17 15:42:54 Re: Vacuum very big table - how the full vacuum works in background/internally?
Previous Message Durumdara 2019-10-17 15:09:51 Vacuum very big table - how the full vacuum works in background/internally?

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-10-17 15:47:47 Re: Compressed pluggable storage experiments
Previous Message Alvaro Herrera 2019-10-17 13:13:59 Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay