Re: v12 and pg_restore -f- - Mailing list pgsql-hackers

From Tom Lane
Subject Re: v12 and pg_restore -f-
Date
Msg-id 19891.1571307850@sss.pgh.pa.us
Whole thread Raw
In response to Re: v12 and pg_restore -f-  (Stephen Frost <sfrost@snowman.net>)
Responses Re: v12 and pg_restore -f-
Re: v12 and pg_restore -f-
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> First, I'd like to clarify what I believe Tom's suggestion is, and then
> talk through that, as his vote sways this topic pretty heavily.

> Tom, I take it your suggestion is to have '-f -' be accepted to mean
> 'goes to stdout' in all branches?

Yes.

> That goes against the argument that
> we don't want to break existing scripts, as it's possible that there are
> existing scripts that depend on '-f -' actually going to a './-' file.

While that's theoretically possible, I think that the number of cases
where somebody is actually expecting that is epsilon.  It seems more
useful to tell people that they can now use "-f -" in all branches,
and it's required to use it as of v12.

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.

> If you meant for all branches to accept '-f -' and have it go to a './-'
> file then that's just a revert of this entire change, which I can't
> agree with either

No, I'm not proposing a full revert.  But there's certainly room to
consider reverting the part that says you *must* write "-f -" to get
output to stdout.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "曾文旌(义从)"
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Block level parallel vacuum