citus
citus copied to clipboard
Add FREEZE Option to COPY Command and Explicit Transaction Management for Shard Moves
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:
- Added the
FREEZE
option toConstructShardCopyStatement
andLocalCopyToShard
. - Implemented transaction management around the
COPY
operation. - Added a truncation step before
COPY
inConnectToRemoteAndStartCopy
to ensure the operation is within the same transaction. - Updated the transaction to close in
ShardCopyDestReceiverShutdown
.