Detach/attach table and index data files from one cluster to another - Mailing list pgsql-hackers

From Sameer Thakur
Subject Detach/attach table and index data files from one cluster to another
Date
Msg-id CABzZFEtk4HacdKyLouqEOjjhktgh5emVfOvC+i1rqXhWtMO4zw@mail.gmail.com
Whole thread
Responses Re: Detach/attach table and index data files from one cluster to another
List pgsql-hackers

Hello,

The current process of transferring data files from one cluster to another by using pg_dump and pg_restore is time consuming.

The proposed tool tries to make migration faster for tables and indices only by copying their binary data files. This is like pg_upgrade but used for migration of table and indices

 The discussion here @ http://www.postgresql.org/message-id/CAA-aLv5cQf09zvFRCB1XXUQLSp-ouX0S_Hq6ryScd6CtamipFQ@mail.gmail.com

speaks of possibility detaching/attaching  databases as an alternative to dump/restore. But the process of freezing XID’s and zeroing out LSN’s make the solution equally time consuming if not more.

 But if we consider just tables and indexes to be detached/reattached, would this be a viable alternative to dump and restore of tables?

 The same discussion indicates it could be done but is more complicated as one has to deal with system catalogs of the newly mounted table and map old OID’s to new ones. This is required to ensure consistency in roles, and objects owned by those roles.

 We would also need to ensure LSN values of the reattached pages are less than the current WAL endpoint in receiver.

 Are there any more issues we need to be aware of?

regards

Sameer

pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Inconsistent DB data in Streaming Replication
Next
From: Dimitri Fontaine
Date:
Subject: Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers