pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces
Date: 2011-10-19 20:33:00
Message-ID: A7962C0F-9A2C-4AFA-891F-7508B0BF2A1D@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

We've just found an issue with pg_dumpall in 9.1.1 where a dump starts with lines like these:

ALTER ROLE dude WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD 'md5bdd7f8e73a214981b1519212b02a5530' VALID UNTIL 'infinity';
ALTER ROLE dude SET default_tablespace TO 'users';

And later in the file has lines like this:

CREATE TABLESPACE users OWNER postgres LOCATION '/data/postgres/pg_tblspc/users';

Unsurprisingly, perhaps, this results in errors such as:

ERROR: invalid value for parameter "default_tablespace": "users"

Seems to me that default_tablespace should only be set after tablespaces are created, no?

This is wreaking havoc with our ability to run pg_upgrade, FWIW.

Best,

David

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-10-19 20:36:41 Re: SSI implementation question
Previous Message Florian Pflug 2011-10-19 20:30:26 Re: synchronized snapshots