Re: patch : Allow toast tables to be moved to a different tablespace
От | Andreas Karlsson |
---|---|
Тема | Re: patch : Allow toast tables to be moved to a different tablespace |
Дата | |
Msg-id | 5500FF01.3020308@proxel.se обсуждение исходный текст |
Ответ на | Re: patch : Allow toast tables to be moved to a different tablespace (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 03/10/2015 01:23 PM, Robert Haas wrote: > On Mon, Mar 9, 2015 at 7:26 PM, Andreas Karlsson <andreas@proxel.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. What I am talking about are the 6 cases below of \d with the current code. I think that case 4) and 5) look the same, which may confuse users skimming the \d into thinking that we have no TOAST table in the case where the TOAST table is in pg_default while the table tablespace is somewhere else. 1. Table in pg_default, no TOAST Column | Type | Modifiers --------+---------+----------- x | integer | 2. Table in pg_default, TOAST in pg_default Column | Type | Modifiers --------+------+----------- x | text | 3. Table in pg_default, TOAST in ts1 Column | Type | Modifiers --------+------+----------- x | text | TOAST Tablespace: "ts1" 4. Table in ts1, no TOAST Column | Type | Modifiers --------+---------+----------- x | integer | Tablespace: "ts1" 5. Table in ts1, TOAST in pg_default Column | Type | Modifiers --------+------+----------- x | text | Tablespace: "ts1" 6. Table in ts1, TOAST in ts1 Column | Type | Modifiers --------+------+----------- x | text | Tablespace: "ts1" TOAST Tablespace: "ts1" >> 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. Ok, my idea was that one might want to put all indexes in a third table space, including TOAST indexes. Not sure how realistic this use case is. -- Andreas Karlsson
В списке pgsql-hackers по дате отправления: