Re: pg_dump & table space

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Luca Ferrari <fluca1978(at)infinito(dot)it>, pgsql-general(at)postgresql(dot)org
Subject: Re: pg_dump & table space
Date: 2009-06-01 16:04:52
Message-ID: 20090601160452.GB5716@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sava Chankov 2009-06-01 17:54:41 INSERT RETURNING rule for joined view
Previous Message Richard Huxton 2009-06-01 15:38:55 Re: ruby connect