Bruce Momjian <[EMAIL PROTECTED]> 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

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to