Re: pg_dump/pg_restore fail for TAR_DUMP and CUSTOM_DUMP from v94/v95/v96 to v11/master. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump/pg_restore fail for TAR_DUMP and CUSTOM_DUMP from v94/v95/v96 to v11/master.
Date
Msg-id 28810.1551451437@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump/pg_restore fail for TAR_DUMP and CUSTOM_DUMP fromv94/v95/v96 to v11/master.  (Suraj Kharage <suraj.kharage@enterprisedb.com>)
List pgsql-hackers
Suraj Kharage <suraj.kharage@enterprisedb.com> writes:
> The Commit 5955d934194c3888f30318209ade71b53d29777f has changed the logic
> to avoid dumping creation and comment commands for the public schema.

Yup.

> As reported by Prabhat, if we try to restore the custom/tar dump taken from
> v10 and earlier versions, we get the reported error for public schema.

Yes.  We're not intending to do anything about that.  The previous scheme
also caused pointless errors in some situations, so this isn't really a
regression.  The area is messy enough already that trying to avoid errors
even with old (wrong) archives would almost certainly cause more problems
than it solves.  In particular, it's *not* easy to fix things in a way
that works conveniently for both superuser and non-superuser restores.
See the mail thread referenced by 5955d9341.

(Note that it's only been very recently that anyone had any expectation
that pg_dump scripts could be restored with zero errors in all cases;
the usual advice was just to ignore noncritical errors.  I'm not that
excited about it if the old advice is still needed when dealing with old
archives.)

            regards, tom lane


pgsql-hackers by date:

Previous
From: Ramanarayana
Date:
Subject: Re: PostgreSQL vs SQL/XML Standards
Next
From: Jesper Pedersen
Date:
Subject: Re: partitioned tables referenced by FKs