binary_upgrade => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
'--format=custom',
"--file=$tempdir/binary_upgrade.dump",
'-w',
clean => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/clean.sql",
'--include-subscriptions',
'-c',
clean_if_exists => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/clean_if_exists.sql",
'--include-subscriptions',
'-c',
'postgres', ], },
column_inserts => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/column_inserts.sql",
- '-a', '--column-inserts',
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/column_inserts.sql",
+ '-a',
+ '--column-inserts',
'postgres', ], },
createdb => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/createdb.sql",
'--include-subscriptions',
'-C',
data_only => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/data_only.sql",
'--include-subscriptions',
'-a',
'-v', # no-op, just make sure it works
'postgres', ], },
defaults => {
- dump_cmd => [ 'pg_dump', '-f', "$tempdir/defaults.sql", 'postgres', ],
- },
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ '-f',
+ "$tempdir/defaults.sql",
+ 'postgres', ], },
+ # Do not use --no-sync to give test coverage for data sync.
defaults_custom_format => {
test_key => 'defaults',
dump_cmd => [
'pg_restore', '-Fc',
"--file=$tempdir/defaults_custom_format.sql",
"$tempdir/defaults_custom_format.dump", ], },
+ # Do not use --no-sync to give test coverage for data sync.
defaults_dir_format => {
test_key => 'defaults',
dump_cmd => [
'pg_restore', '-Fd',
"--file=$tempdir/defaults_dir_format.sql",
"$tempdir/defaults_dir_format", ], },
+ # Do not use --no-sync to give test coverage for data sync.
defaults_parallel => {
test_key => 'defaults',
dump_cmd => [
'pg_restore',
"--file=$tempdir/defaults_parallel.sql",
"$tempdir/defaults_parallel", ], },
+ # Do not use --no-sync to give test coverage for data sync.
defaults_tar_format => {
test_key => 'defaults',
dump_cmd => [
"$tempdir/defaults_tar_format.tar", ], },
exclude_dump_test_schema => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/exclude_dump_test_schema.sql",
- '--exclude-schema=dump_test', 'postgres', ], },
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/exclude_dump_test_schema.sql",
+ '--exclude-schema=dump_test',
+ 'postgres', ], },
exclude_test_table => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/exclude_test_table.sql",
'--exclude-table=dump_test.test_table',
'postgres', ], },
exclude_test_table_data => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/exclude_test_table_data.sql",
'--exclude-table-data=dump_test.test_table',
'--no-unlogged-table-data',
pg_dumpall_globals => {
dump_cmd => [
'pg_dumpall', '-v',
- "--file=$tempdir/pg_dumpall_globals.sql", '-g', ], },
+ "--file=$tempdir/pg_dumpall_globals.sql", '-g',
+ '--no-sync', ], },
pg_dumpall_globals_clean => {
dump_cmd => [
- 'pg_dumpall', "--file=$tempdir/pg_dumpall_globals_clean.sql",
- '-g', '-c', ], },
+ 'pg_dumpall',
+ "--file=$tempdir/pg_dumpall_globals_clean.sql",
+ '-g',
+ '-c',
+ '--no-sync', ], },
pg_dumpall_dbprivs => {
- dump_cmd =>
- [ 'pg_dumpall', "--file=$tempdir/pg_dumpall_dbprivs.sql", ], },
+ dump_cmd => [
+ 'pg_dumpall',
+ '--no-sync',
+ "--file=$tempdir/pg_dumpall_dbprivs.sql", ], },
no_blobs => {
- dump_cmd =>
- [ 'pg_dump', "--file=$tempdir/no_blobs.sql", '-B', 'postgres', ], },
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/no_blobs.sql",
+ '-B',
+ 'postgres', ], },
no_privs => {
- dump_cmd =>
- [ 'pg_dump', "--file=$tempdir/no_privs.sql", '-x', 'postgres', ], },
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/no_privs.sql",
+ '-x',
+ 'postgres', ], },
no_owner => {
- dump_cmd =>
- [ 'pg_dump', "--file=$tempdir/no_owner.sql", '-O', 'postgres', ], },
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/no_owner.sql",
+ '-O',
+ 'postgres', ], },
only_dump_test_schema => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/only_dump_test_schema.sql",
- '--schema=dump_test', 'postgres', ], },
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/only_dump_test_schema.sql",
+ '--schema=dump_test',
+ 'postgres', ], },
only_dump_test_table => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/only_dump_test_table.sql",
'--table=dump_test.test_table',
'--lock-wait-timeout=1000000',
role => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/role.sql",
'--role=regress_dump_test_role',
'--schema=dump_test_second_schema',
test_key => 'role',
dump_cmd => [
'pg_dump',
+ '--no-sync',
'--format=directory',
'--jobs=2',
"--file=$tempdir/role_parallel",
schema_only => {
dump_cmd => [
'pg_dump', '--format=plain', "--file=$tempdir/schema_only.sql",
- '-s', 'postgres', ], },
+ '--no-sync', '-s', 'postgres', ], },
section_pre_data => {
dump_cmd => [
'pg_dump', "--file=$tempdir/section_pre_data.sql",
'--include-subscriptions',
- '--section=pre-data', 'postgres', ], },
+ '--section=pre-data', '--no-sync', 'postgres', ], },
section_data => {
dump_cmd => [
'pg_dump', "--file=$tempdir/section_data.sql",
- '--section=data', 'postgres', ], },
+ '--section=data', '--no-sync', 'postgres', ], },
section_post_data => {
dump_cmd => [
'pg_dump', "--file=$tempdir/section_post_data.sql",
- '--section=post-data', 'postgres', ], },
+ '--section=post-data', '--no-sync', 'postgres', ], },
test_schema_plus_blobs => {
dump_cmd => [
'pg_dump', "--file=$tempdir/test_schema_plus_blobs.sql",
- '--schema=dump_test', '-b', '-B', 'postgres', ], },
+
+ '--schema=dump_test', '-b', '-B', '--no-sync', 'postgres', ], },
with_oids => {
dump_cmd => [
'pg_dump', '--oids',
- '--include-subscriptions',
+ '--include-subscriptions', '--no-sync',
"--file=$tempdir/with_oids.sql", 'postgres', ], },);
###############################################################
'-U', $dbname4 ],
'pg_dumpall with long ASCII name 1');
$node->command_ok(
- [ 'pg_dumpall', '-r', '-f', $discard, '--dbname',
+ [ 'pg_dumpall', '--no-sync', '-r', '-f', $discard, '--dbname',
$node->connstr($dbname2),
'-U', $dbname3 ],
'pg_dumpall with long ASCII name 2');
$node->command_ok(
- [ 'pg_dumpall', '-r', '-f', $discard, '--dbname',
+ [ 'pg_dumpall', '--no-sync', '-r', '-f', $discard, '--dbname',
$node->connstr($dbname3),
'-U', $dbname2 ],
'pg_dumpall with long ASCII name 3');
$node->command_ok(
- [ 'pg_dumpall', '-r', '-f', $discard, '--dbname',
+ [ 'pg_dumpall', '--no-sync', '-r', '-f', $discard, '--dbname',
$node->connstr($dbname4),
'-U', $dbname1 ],
'pg_dumpall with long ASCII name 4');
$node->command_ok(
- [ 'pg_dumpall', '-r', '-l', 'dbname=template1' ],
+ [ 'pg_dumpall', '--no-sync', '-r', '-l', 'dbname=template1' ],
'pg_dumpall -l accepts connection string');
$node->run_log([ 'createdb', "foo\n\rbar" ]);
# not sufficient to use -r here
$node->command_fails(
- [ 'pg_dumpall', '-f', $discard ],
+ [ 'pg_dumpall', '--no-sync', '-f', $discard ],
'pg_dumpall with \n\r in database name');
$node->run_log([ 'dropdb', "foo\n\rbar" ]);
# XXX no printed message when this fails, just SIGPIPE termination
$node->command_ok(
- [ 'pg_dump', '-Fd', '-j2', '-f', $dirfmt,
+ [ 'pg_dump', '-Fd', '--no-sync', '-j2', '-f', $dirfmt,
'-U', $dbname1, $node->connstr($dbname1) ],
'parallel dump');
'parallel restore with create');
-$node->command_ok([ 'pg_dumpall', '-f', $plain, '-U', $dbname1 ],
+$node->command_ok([ 'pg_dumpall', '--no-sync', '-f', $plain, '-U', $dbname1 ],
'take full dump');
system_log('cat', $plain);
my ($stderr, $result);
createdb "$dbname3" || createdb_status=$?
if "$MAKE" -C "$oldsrc" installcheck; then
- pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
+ pg_dumpall --no-sync -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
if [ "$newsrc" != "$oldsrc" ]; then
oldpgversion=`psql -X -A -t -d regression -c "SHOW server_version_num"`
fix_sql=""
*) sh ./analyze_new_cluster.sh ;;
esac
-pg_dumpall -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
+pg_dumpall --no-sync -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
pg_ctl -m fast stop
# no need to echo commands anymore
my %pgdump_runs = (
binary_upgrade => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/binary_upgrade.sql",
- '--schema-only', '--binary-upgrade',
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/binary_upgrade.sql",
+ '--schema-only',
+ '--binary-upgrade',
'--dbname=postgres', ], },
clean => {
dump_cmd => [
'pg_dump', "--file=$tempdir/clean.sql",
- '-c', '--dbname=postgres', ], },
+ '-c', '--no-sync',
+ '--dbname=postgres', ], },
clean_if_exists => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/clean_if_exists.sql",
'-c',
'--if-exists',
'postgres', ], },
column_inserts => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/column_inserts.sql",
- '-a', '--column-inserts',
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/column_inserts.sql",
+ '-a',
+ '--column-inserts',
'postgres', ], },
createdb => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/createdb.sql",
'-C',
'-R', # no-op, just for testing
data_only => {
dump_cmd => [
'pg_dump',
+ '--no-sync',
"--file=$tempdir/data_only.sql",
'-a',
'-v', # no-op, just make sure it works
defaults_custom_format => {
test_key => 'defaults',
dump_cmd => [
- 'pg_dump', '-Fc', '-Z6',
+ 'pg_dump', '--no-sync', '-Fc', '-Z6',
"--file=$tempdir/defaults_custom_format.dump", 'postgres', ],
restore_cmd => [
'pg_restore',
defaults_dir_format => {
test_key => 'defaults',
dump_cmd => [
- 'pg_dump', '-Fd',
+ 'pg_dump', '--no-sync', '-Fd',
"--file=$tempdir/defaults_dir_format", 'postgres', ],
restore_cmd => [
'pg_restore',
defaults_parallel => {
test_key => 'defaults',
dump_cmd => [
- 'pg_dump', '-Fd', '-j2', "--file=$tempdir/defaults_parallel",
- 'postgres', ],
+ 'pg_dump', '--no-sync', '-Fd', '-j2',
+ "--file=$tempdir/defaults_parallel", 'postgres', ],
restore_cmd => [
'pg_restore',
"--file=$tempdir/defaults_parallel.sql",
defaults_tar_format => {
test_key => 'defaults',
dump_cmd => [
- 'pg_dump', '-Ft',
+ 'pg_dump', '--no-sync', '-Ft',
"--file=$tempdir/defaults_tar_format.tar", 'postgres', ],
restore_cmd => [
'pg_restore',
"--file=$tempdir/defaults_tar_format.sql",
"$tempdir/defaults_tar_format.tar", ], },
pg_dumpall_globals => {
- dump_cmd =>
- [ 'pg_dumpall', "--file=$tempdir/pg_dumpall_globals.sql", '-g', ],
+ dump_cmd => [
+ 'pg_dumpall',
+ '--no-sync',
+ "--file=$tempdir/pg_dumpall_globals.sql",
+ '-g', ],
},
no_privs => {
- dump_cmd =>
- [ 'pg_dump', "--file=$tempdir/no_privs.sql", '-x', 'postgres', ], },
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/no_privs.sql",
+ '-x',
+ 'postgres', ], },
no_owner => {
- dump_cmd =>
- [ 'pg_dump', "--file=$tempdir/no_owner.sql", '-O', 'postgres', ], },
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/no_owner.sql",
+ '-O',
+ 'postgres', ], },
schema_only => {
- dump_cmd =>
- [ 'pg_dump', "--file=$tempdir/schema_only.sql", '-s', 'postgres', ],
+ dump_cmd => [
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/schema_only.sql",
+ '-s',
+ 'postgres', ],
},
section_pre_data => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/section_pre_data.sql",
- '--section=pre-data', 'postgres', ], },
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/section_pre_data.sql",
+ '--section=pre-data',
+ 'postgres', ], },
section_data => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/section_data.sql",
- '--section=data', 'postgres', ], },
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/section_data.sql",
+ '--section=data',
+ 'postgres', ], },
section_post_data => {
dump_cmd => [
- 'pg_dump', "--file=$tempdir/section_post_data.sql",
+ 'pg_dump',
+ '--no-sync',
+ "--file=$tempdir/section_post_data.sql",
'--section=post-data', 'postgres', ], },);
###############################################################