diff --git a/docs/include/copy-db.rst b/docs/include/copy-db.rst index ae2c7d0d..7598a6ae 100644 --- a/docs/include/copy-db.rst +++ b/docs/include/copy-db.rst @@ -22,4 +22,5 @@ --resume Allow resuming operations after a failure --not-consistent Allow taking a new snapshot on the source database --snapshot Use snapshot obtained with pg_export_snapshot + --use-copy-binary Use the COPY BINARY format for COPY operations diff --git a/src/bin/pgcopydb/cli_copy.c b/src/bin/pgcopydb/cli_copy.c index 7a10ea82..cb1a9892 100644 --- a/src/bin/pgcopydb/cli_copy.c +++ b/src/bin/pgcopydb/cli_copy.c @@ -52,7 +52,8 @@ static CommandLine copy_db_command = " --restart Allow restarting when temp files exist already\n" " --resume Allow resuming operations after a failure\n" " --not-consistent Allow taking a new snapshot on the source database\n" - " --snapshot Use snapshot obtained with pg_export_snapshot\n", + " --snapshot Use snapshot obtained with pg_export_snapshot\n" + " --use-copy-binary Use the COPY BINARY format for COPY operations\n", cli_copy_db_getopts, cli_clone); diff --git a/src/bin/pgcopydb/pgsql.h b/src/bin/pgcopydb/pgsql.h index 16553a03..6e14b9f2 100644 --- a/src/bin/pgcopydb/pgsql.h +++ b/src/bin/pgcopydb/pgsql.h @@ -337,7 +337,6 @@ typedef struct CopyArgs bool truncate; bool freeze; bool useCopyBinary; - uint64_t bytesTransmitted; } CopyArgs; diff --git a/src/bin/pgcopydb/table-data.c b/src/bin/pgcopydb/table-data.c index 9422bc25..5e16b37b 100644 --- a/src/bin/pgcopydb/table-data.c +++ b/src/bin/pgcopydb/table-data.c @@ -1129,7 +1129,6 @@ copydb_table_create_lockfile(CopyDataSpec *specs, args->dstAttrList = tableSpecs->sourceTable->attrList; args->truncate = false; /* default value, see below */ args->freeze = tableSpecs->sourceTable->partition.partCount <= 1; - args->bytesTransmitted = 0; args->useCopyBinary = specs->useCopyBinary; /* diff --git a/tests/endpos-in-multi-wal-txn/copydb.sh b/tests/endpos-in-multi-wal-txn/copydb.sh index eca2e39a..99068007 100755 --- a/tests/endpos-in-multi-wal-txn/copydb.sh +++ b/tests/endpos-in-multi-wal-txn/copydb.sh @@ -34,7 +34,7 @@ sleep 1 pgcopydb stream setup # pgcopydb clone uses the environment variables -pgcopydb clone --use-binary-copy +pgcopydb clone --use-copy-binary # now that the copying is done, inject some SQL DML changes to the source psql -d ${PGCOPYDB_SOURCE_PGURI} -f /usr/src/pgcopydb/multi-wal-txn.sql