Re: v12 and pg_restore -f-

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: v12 and pg_restore -f-
Date: 2019-10-08 18:08:40
Message-ID: 20191008180840.GQ6962@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Greetings,

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> > "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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.

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.
>
> > 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.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shatamjeev Dewan 2019-10-08 18:14:15 RE: Declarative Range Partitioning Postgres 11
Previous Message Michael Lewis 2019-10-08 17:33:26 Re: Declarative Range Partitioning Postgres 11

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-10-08 18:10:41 Re: abort-time portal cleanup
Previous Message Anders Åstrand 2019-10-08 18:07:02 Re: PATCH: Add uri percent-encoding for binary data