Re: Conflicting option checking in pg_restore - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Conflicting option checking in pg_restore
Date
Msg-id 20181030023931.GC1644@paquier.xyz
Whole thread Raw
In response to Re: Conflicting option checking in pg_restore  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On Mon, Oct 29, 2018 at 07:11:35AM +0100, Fabien COELHO wrote:
> Michaël suggests that there is no issue of external tool using the internal
> function, so I'm fine with this version.
>
> I have switched the patch to ready for committer.

One catch with this refactoring is that for example this combination
does not result in an error on HEAD, but it does with the patch:
pg_restore -l -C -1

Anyway, the fact that we save the caller from one exit_horribly()
knowing that opening the archive is completely useless makes the move
worth it in my opinion.  RestoreArchive should complain about things
which depend on the opened archive, which is the only thing it does
now.  I would not risk back-patching it though.

At the same time, I have checked the set of TAP tests for pg_restore and
the cross-option checks are all covered, so no need to go crazy on this
side.

For the archive's sake, the original commit 3a819b07 which did the
option check in RestoreArchive comes from here:
https://www.postgresql.org/message-id/496B6B40.1010909@hagander.net

And committed, thanks Daniel and Fabien!
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: partition tree inspection functions
Next
From: Michael Paquier
Date:
Subject: Re: replication_slots usability issue