Re: Move vs. copy table between databases that share a tablespace?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Move vs. copy table between databases that share a tablespace?
Дата
Msg-id 13608.1554303349@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Move vs. copy table between databases that share a tablespace?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Move vs. copy table between databases that share a tablespace?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-general
I wrote:
> Steven Lembark <lembark@wrkhors.com> writes:
>> Given that the two databases live in the same cluster and have
>> the owner & the tablespace in common, is there any way to move
>> the contents without a dump & reload?

> In principle you could do that; it's more or less the same thing that
> pg_upgrade --link does.

Actually, thinking about that a bit harder: there's one aspect of
what pg_upgrade does that's really hard to control from userspace,
and that's forcing tables to have the same OIDs as before.  In this
context, that means you're probably out of luck if the table has a
TOAST table, unless the TOAST table is empty.  There wouldn't be
any good way to keep TOAST pointers valid across the move.

(PG v12 will make that easier, but that's no help to you today.)

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: rihad
Дата:
Сообщение: Re: Recommendation to run vacuum FULL in parallel
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Recommendation to run vacuum FULL in parallel