pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres 9.6.3 pg_dump issue
2+ messages / 2 participants
[nested] [flat]

* Postgres 9.6.3 pg_dump issue
@ 2017-05-13 22:02 Vlad Alex <vlad.alex.md@gmail.com>
  2017-05-13 22:47 ` Re: Postgres 9.6.3 pg_dump issue Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Vlad Alex @ 2017-05-13 22:02 UTC (permalink / raw)
  To: pgsql-bugs

Hello Support Team:

The server version is:
PostgreSQL 9.6.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 
20120313 (Red Hat 4.4.7-17), 64-bit

pg_dump 9.6.3 does not dump the schema with this command:

$ pg_dump --create --clean --if-exists --schema-only <dbname> -f <file>

The missing 'public' schema was not an issue in 9.6.2.


Here is the output of pg_dump command:

pg_dump: [archiver (db)] query failed: ERROR:  schema "public" does not 
exist
LINE 1: ...::regclass AND pip.objsubid = 0 AND pip.objoid <> 'public'::...
                                                              ^
pg_dump: [archiver (db)] query was: SELECT n.tableoid, n.oid, n.nspname, 
(SELECT rolname FROM pg_catalog.pg_roles WHERE oid = nspowner) AS 
rolname, (SELECT pg_catalog.array_agg(acl) FROM (SELECT 
pg_catalog.unnest(coalesce(n.nspacl,pg_catalog.acldefault('n',n.nspowner))) 
AS acl EXCEPT SELECT 
pg_catalog.unnest(coalesce(pip.initprivs,pg_catalog.acldefault('n',n.nspowner)))) 
as foo) as nspacl, (SELECT pg_catalog.array_agg(acl) FROM (SELECT 
pg_catalog.unnest(coalesce(pip.initprivs,pg_catalog.acldefault('n',n.nspowner))) 
AS acl EXCEPT SELECT 
pg_catalog.unnest(coalesce(n.nspacl,pg_catalog.acldefault('n',n.nspowner)))) 
as foo) as rnspacl, NULL as initnspacl, NULL as initrnspacl FROM 
pg_namespace n LEFT JOIN pg_init_privs pip ON (n.oid = pip.objoid AND 
pip.classoid = 'pg_namespace'::regclass AND pip.objsubid = 0 AND 
pip.objoid <> 'public'::regnamespace)

The similar message is in the server log.

Please advise.

Thanks,
Vlad


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Postgres 9.6.3 pg_dump issue
  2017-05-13 22:02 Postgres 9.6.3 pg_dump issue Vlad Alex <vlad.alex.md@gmail.com>
@ 2017-05-13 22:47 ` Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Paquier @ 2017-05-13 22:47 UTC (permalink / raw)
  To: Vlad Alex <vlad.alex.md@gmail.com>; +Cc: pgsql-bugs

On Sun, May 14, 2017 at 7:02 AM, Vlad Alex <vlad.alex.md@gmail.com> wrote:
> Here is the output of pg_dump command:
>
> pg_dump: [archiver (db)] query failed: ERROR:  schema "public" does not
> exist
> LINE 1: ...::regclass AND pip.objsubid = 0 AND pip.objoid <> 'public'::...
>                                                              ^
> pg_dump: [archiver (db)] query was: SELECT n.tableoid, n.oid, n.nspname,
> (SELECT rolname FROM pg_catalog.pg_roles WHERE oid = nspowner) AS rolname,
> (SELECT pg_catalog.array_agg(acl) FROM (SELECT
> pg_catalog.unnest(coalesce(n.nspacl,pg_catalog.acldefault('n',n.nspowner)))
> AS acl EXCEPT SELECT
> pg_catalog.unnest(coalesce(pip.initprivs,pg_catalog.acldefault('n',n.nspowner))))
> as foo) as nspacl, (SELECT pg_catalog.array_agg(acl) FROM (SELECT
> pg_catalog.unnest(coalesce(pip.initprivs,pg_catalog.acldefault('n',n.nspowner)))
> AS acl EXCEPT SELECT
> pg_catalog.unnest(coalesce(n.nspacl,pg_catalog.acldefault('n',n.nspowner))))
> as foo) as rnspacl, NULL as initnspacl, NULL as initrnspacl FROM
> pg_namespace n LEFT JOIN pg_init_privs pip ON (n.oid = pip.objoid AND
> pip.classoid = 'pg_namespace'::regclass AND pip.objsubid = 0 AND pip.objoid
> <> 'public'::regnamespace)
>
> The similar message is in the server log.

The same issue has been reported a couple of days back in another thread:
https://www.postgresql.org/message-id/20170512181801.1795.47483@wrigleys.postgresql.org
That's easily reproducible by the way, and triggered by getNamespaces
when not using outputClean().
-- 
Michael


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-05-13 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-05-13 22:02 Postgres 9.6.3 pg_dump issue Vlad Alex <vlad.alex.md@gmail.com>
2017-05-13 22:47 ` Michael Paquier <michael.paquier@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox