Thread: [BUGS] Postgres 9.6.3 pg_dump issue
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
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