From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Julien Tachoires <julmon(at)gmail(dot)com> |
Cc: | Jaime Casanova <jaime(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: patch : Allow toast tables to be moved to a different tablespace |
Date: | 2011-12-13 17:06:13 |
Message-ID: | CA+TgmoaJOK6yKMZw8sc5HzRD8hb0bzCV0U4JuNc3XdACmfQCYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Dec 13, 2011 at 12:02 PM, Julien Tachoires <julmon(at)gmail(dot)com> wrote:
> Right, it seems to happen when the destination tablespace is the same
> as the database's tbs, because, in this case, relation's tbs is set to
> InvalidOid :
> src/backend/commands/tablecmds.c line 8342
>
> + rd_rel->reltablespace = (newTableSpace == MyDatabaseTableSpace) ?
> InvalidOid : newTableSpace;
>
> Why don't just asign newTableSpace value here ?
When a relation is stored in the default tablespace, we always record
that in the system catalogs as InvalidOid. Otherwise, if the
database's default tablespace were changed, things would break.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-12-13 17:14:17 | Re: WIP: SP-GiST, Space-Partitioned GiST |
Previous Message | Julien Tachoires | 2011-12-13 17:02:28 | Re: patch : Allow toast tables to be moved to a different tablespace |