Re: Omitting tablespace creation from pg_dumpall... - Mailing list pgsql-general

From Tom Lane
Subject Re: Omitting tablespace creation from pg_dumpall...
Date
Msg-id 12796.1150429092@sss.pgh.pa.us
Whole thread Raw
In response to Omitting tablespace creation from pg_dumpall...  (Chander Ganesan <chander@otg-nc.com>)
Responses Re: Omitting tablespace creation from pg_dumpall...  (Chander Ganesan <chander@otg-nc.com>)
List pgsql-general
Chander Ganesan <chander@otg-nc.com> writes:
> I'd like to suggest that a feature be added to pg_dumpall to remove
> tablespace definitions/creation from the output.  While the inclusion is
> important for backups - it's equally painful when attempting to migrate
> data from a development to production database.  Since PostgreSQL won't
> create the directory that will contain the tablespace, the tablespace
> creation will fail.  Following that, any objects that are to be created
> in that tablespace will fail (since the tablespace doesn't exist).

If the above statements were actually true, it'd be a problem, but they
are not true.  The dump only contains "SET default_tablespace = foo"
commands, which may themselves fail, but they won't prevent subsequent
CREATE TABLE commands from succeeding.

            regards, tom lane

pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: Out of memory error in 8.1.0 Win32
Next
From: Chander Ganesan
Date:
Subject: Re: Omitting tablespace creation from pg_dumpall...