After initializing a cluster with initdb -D data --no-locale as the user jd.
I created a table named foo in the template1 database.

create table foo(bar text, baz bigserial);

When executing pg_dumpall:

bin/pg_dumpall -U jd -p5500

Looks as it should. However:

[EMAIL PROTECTED] pgsqldev]$ bin/pg_dumpall -U jd -D -o -p 5500

--
-- PostgreSQL database cluster dump
--

\connect postgres

--
-- Roles
--







--
-- Database creation
--

REVOKE ALL ON DATABASE template1 FROM PUBLIC;
REVOKE ALL ON DATABASE template1 FROM jd;
GRANT ALL ON DATABASE template1 TO jd;


--
-- Roles
--

ALTER ROLE jd WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN;


\connect postgres

pg_dump: INSERT (-d, -D) and OID (-o) options cannot be used together
pg_dump: (The INSERT command cannot set OIDs.)
pg_dumpall: pg_dump failed on database "postgres", exiting

Why am I getting a partial dump when the options are not compatible?

Further: bin/pg_dumpall -U jd -D -o -g -p 5500
--
-- PostgreSQL database cluster dump
--

\connect postgres

--
-- Roles
--







--
-- Roles
--

ALTER ROLE jd WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN;


--
-- PostgreSQL database cluster dump complete
--


Notice that I passed the -g (globals) flag but no globals have been
dumped and I don't get the error about -o and -D being used together.

Also: bin/pg_dumpall -U jd -g -p 5500
--
-- PostgreSQL database cluster dump
--

\connect postgres

--
-- Roles
--







--
-- Roles
--

ALTER ROLE jd WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN;


--
-- PostgreSQL database cluster dump complete
--


I have specified globals but I am not getting any:

template1=# select * from pg_roles;
rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcatupdate | rolcanlogin | rolconnlimit | rolpassword | rolvaliduntil | rolconfig | oid
---------+----------+------------+---------------+-------------+--------------+-------------+--------------+-------------+---------------+-----------+-----
jd | t | t | t | t | t | t | -1 | ******** | | | 10
(1 row)



Sincerely,


Joshua D. Drake





--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to