Re: v12 and pg_restore -f-

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: v12 and pg_restore -f-
Date: 2019-10-09 12:07:40
Message-ID: CAHE3wgi=VU0G9=S60=gQH+yyk8-Ke99dkt8Dp4OpZXkSu=67fQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Em ter, 8 de out de 2019 às 15:08, Stephen Frost <sfrost(at)snowman(dot)net> escreveu:
>
> 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...
>
Indeed, it was a broken behavior and the idea was to fix it. However,
changing pg_restore in back-branches is worse than do nothing because
it could break existent scripts.

> > > 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.
>
Yeah, if you check pg_restore version, you could use new syntax for
12+. We break scripts every release (mainly with catalog changes) and
I don't know why this change is different than the other ones. The
pg_restore changes is more user-friendly and less error-prone.

Regards,

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Timmy Siu 2019-10-09 12:33:41 Allowing client access
Previous Message Luca Ferrari 2019-10-09 12:02:52 Re: Event Triggers and Dropping Objects

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2019-10-09 12:15:01 Re: let's make the list of reportable GUCs configurable (was Re: Add %r substitution for psql prompts to show recovery status)
Previous Message Robert Haas 2019-10-09 11:50:33 Re: Standby accepts recovery_target_timeline setting?