8.1beta2 pg_dumpall inconsistencies

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: 8.1beta2 pg_dumpall inconsistencies
Date: 2005-10-01 21:54:27
Message-ID: 433F0593.8070005@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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:

[jd(at)jd 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/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-10-01 21:56:07 Re: [PERFORM] A Better External Sort?
Previous Message Tom Lane 2005-10-01 21:15:25 Re: [HACKERS] Query in SQL statement