We use the distributed transactions to perform the writes. Explore if avoiding the transaction code path can speed up the whole operation.
If the whole operation succeeds it ideally should be much faster. If the operation fails we can truncate the whole table and restart the operation. This obviously should only be used when the table that is to copied over is new and we can truncate the table when failures occur
The logic is to use the non-transactional session instead of the transactional session in the PGgate layer to perform the writes.