Re: patch : Allow toast tables to be moved to a different tablespace

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: Julien Tachoires <julmon(at)gmail(dot)com>, Alex Shulgin <ash(at)commandprompt(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch : Allow toast tables to be moved to a different tablespace
Date: 2015-03-10 12:23:11
Message-ID: CA+TgmobETPtbU7oFcecnAuqL+C5-9eF2zpfDOVB+9J51rhbCLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
>>> - I do not like how \d handles the toast tablespace. Having TOAST in
>>> pg_default and the table in another space looks the same as if there was
>>> no TOAST table at all. I think we should always print both tablespaces
>>> if either of them are not pg_default.
>>
>> If we do it that way, we should always show the tablespace even if it's
>> pg_default in any case to be consistent. I'm pretty sure that we don't
>> want that.
>
> I think we will have to agree to disagree here. I think it should be obvious
> when the toast table is in the default tablespace for tables outside it.

I'm not sure about the details here, but that seems like a pretty
sound principle.

>>> - Would it be interesting to add syntax for moving the toast index to a
>>> separate tablespace?
>>
>> -1, we just want to be able to move TOAST heap, which is supposed to
>> contain a lot of data and we want to move on a different storage device
>> / filesystem.
>
> I think we should allow moving the indexes for consistency. With this patch
> we can move everything except for TOAST indexes.

It might make sense to always put the TOAST index with the TOAST
table, but it seems strange to put the TOAST index with the heap and
the TOAST table someplace else. Or at least, that's how it seems to
me.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2015-03-10 12:27:40 Re: patch : Allow toast tables to be moved to a different tablespace
Previous Message Alvaro Herrera 2015-03-10 12:16:12 Re: pg_rewind in contrib