Re: pg_dump & table space - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: pg_dump & table space
Date
Msg-id 20090601160452.GB5716@alvh.no-ip.org
Whole thread Raw
In response to Re: pg_dump & table space  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:

> However, this is really just cosmetic, as the dump is set up like this:
>
> SET default_tablespace = whatever;
> CREATE TABLE whichever(...);
>
> If tablespace 'whatever' doesn't exist, you'll get an error on the SET
> but the CREATE will succeed anyway.  (I guess this only works cleanly
> if the destination machine has *none* of the source's tablespaces,
> else things might get assigned to unexpected tablespaces.  But it's
> definitely possible to restore a dump without having the same
> tablespaces.)

Maybe it would be better if the dump has a RESET default_tablespace
before the SET.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: ruby connect
Next
From: Sava Chankov
Date:
Subject: INSERT RETURNING rule for joined view