Re: Detach/attach table and index data files from one cluster to another

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Sameer Thakur <samthakur74(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Detach/attach table and index data files from one cluster to another
Date: 2013-04-12 18:15:11
Message-ID: 20130412181511.GL4361@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Well, it wouldn't be that hard to replace XIDs with FrozenXID or
> InvalidXID as appropriate, if you had access to the source database's
> clog while you did the copying. It just wouldn't be very fast.

If you're doing that in a streaming method, it strikes me that it'd be
plenty fast.

> I suppose it would still be faster than a COPY transfer, but I'm not
> sure it'd be enough faster to justify the work and the additional
> portability hits you'd be taking.

The big win here over a binary COPY is pulling through the indexes as-is
as well- without having to rebuild them.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-12 18:31:21 Re: Detach/attach table and index data files from one cluster to another
Previous Message Alvaro Herrera 2013-04-12 18:08:26 Re: (auto)vacuum truncate exclusive lock