citus icon indicating copy to clipboard operation
citus copied to clipboard

Add FREEZE Option to COPY Command and Explicit Transaction Management for Shard Moves

Open m3hm3t opened this issue 5 months ago • 2 comments

Here's a suggested description for your PR based on the issue:


Description

This PR enhances shard moves and splits by adding the FREEZE option to the COPY command, reducing the need for post-operation vacuuming. To achieve this:

  1. Added the FREEZE option to ConstructShardCopyStatement and LocalCopyToShard.
  2. Implemented transaction management around the COPY operation.
  3. Added a truncation step before COPY in ConnectToRemoteAndStartCopy to ensure the operation is within the same transaction.
  4. Updated the transaction to close in ShardCopyDestReceiverShutdown.

m3hm3t avatar Sep 09 '24 21:09 m3hm3t