Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alvaro Herrera <alvherre@xxxxxxxxxxxxxxx> writes:
> On 2019-Apr-03, Tom Lane wrote:
>> 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.

> Hmm, couldn't you use the binary-upgrade support functions just prior to
> creating the table in the target database?

Yeah, in theory you could do that, if the OID isn't already in use for
a table.  But that just added several more steps and more ways to
shoot yourself in the foot.  I'm starting to think this wouldn't really
be worth the risk.

			regards, tom lane





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux