Re: Updated ALTER TABLE ... SET TABLESPACE patch
От | Tom Lane |
---|---|
Тема | Re: Updated ALTER TABLE ... SET TABLESPACE patch |
Дата | |
Msg-id | 3777.1089599811@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Updated ALTER TABLE ... SET TABLESPACE patch (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Updated ALTER TABLE ... SET TABLESPACE patch
|
Список | pgsql-patches |
Bruce Momjian <pgman@candle.pha.pa.us> writes: > Will toast go in the same tablespace as the base table? That is the current design, and I'd prefer to keep it that way because anything else adds great complexity for unclear gain. Two examples of pain points: 1. That pending patch to report a table's tablespace in psql \d would get lots more complex: you'd have up to three tablespaces to worry about (base table, toast table, toast index). 2. How would pg_dump restore such a setup? It could not generate a script that says ALTER TABLE pg_toast.pg_toast_NNN SET TABLESPACE, because it has no way to know what NNN should be. I think we'd have to add locutions like "ALTER TABLE foo SET TOAST TABLESPACE t" and "ALTER TABLE foo SET TOAST INDEX TABLESPACE t" to do this in a clean fashion. In fact, now that I think of it, the patch-as-committed already introduces some serious headaches for pg_dump: it can't know for sure what name will be assigned to constraint indexes (pkey and unique indexes) so it has no good way to emit ALTER TABLE SET TABLESPACE commands for those indexes. regards, tom lane
В списке pgsql-patches по дате отправления: