Re: pgsql: Fix pg_dump to dump shell types.

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Fix pg_dump to dump shell types.
Date: 2015-08-09 22:07:55
Message-ID: 55C7CF3B.30703@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 08/04/2015 07:34 PM, Tom Lane wrote:
> Fix pg_dump to dump shell types.
>
> Per discussion, it really ought to do this. The original choice to
> exclude shell types was probably made in the dark ages before we made
> it harder to accidentally create shell types; but that was in 7.3.
>
> Also, cause the standard regression tests to leave a shell type behind,
> for convenience in testing the case in pg_dump and pg_upgrade.
>
> Back-patch to all supported branches.
>
>

Still not quite there. If either 9.0 or 9.1 is upgraded to 9.2 or later,
they fail like this:

pg_restore: creating TYPE "public"."myshell"
pg_restore: setting owner and privileges for TYPE "public"."myshell"
pg_restore: setting owner and privileges for ACL "public"."myshell"
pg_restore: [archiver (db)] Error from TOC entry 4293; 0 0 ACL
myshell buildfarm
pg_restore: [archiver (db)] could not execute query: ERROR: type
"myshell" is only a shell
Command was: REVOKE ALL ON TYPE "myshell" FROM PUBLIC;
REVOKE ALL ON TYPE "myshell" FROM "buildfarm";
GRANT ALL ON TYPE "myshell" TO PUBL...

We could just declare that we don't support this for versions older than
9.2, in which case I would just remove the type from the test database
before testing cross-version upgrade. But if it's easily fixed then
let's do it.

cheers

andrew

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-08-09 22:23:13 Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types.
Previous Message Magnus Hagander 2015-08-09 12:51:43 pgsql: Fix typo in LDAP example

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2015-08-09 22:20:17 Re: Precedence of standard comparison operators
Previous Message Alexander Korotkov 2015-08-09 21:56:27 WIP: Rework access method interface