From ff96d9f2984bb473ec6fdad779a09070a227d550 Mon Sep 17 00:00:00 2001
From: Michael Banck <michael.banck@credativ.de>
Date: Fri, 2 Feb 2018 15:02:26 +0100
Subject: [PATCH] WIP pg_dump TAP testcase

---
 src/bin/pg_dump/t/002_pg_dump.pl | 89 +++++++++++++++++++++++++++++++++++++---
 1 file changed, 84 insertions(+), 5 deletions(-)

diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index 3e9b4d94dc..f8e64910b7 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -153,6 +153,12 @@ my %pgdump_runs = (
 			'--format=tar',
 			"--file=$tempdir/defaults_tar_format.sql",
 			"$tempdir/defaults_tar_format.tar", ], },
+
+	parallel_discard => {
+		dump_cmd => [
+			'pg_dump', '-Fd', '-j2', '--file=/dev/null',
+			'postgres', ], },
+
 	exclude_dump_test_schema => {
 		dump_cmd => [
 			'pg_dump', '--no-sync',
@@ -334,6 +340,7 @@ my %tests = (
 			exclude_dump_test_schema => 1,
 			no_privs                 => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -372,6 +379,7 @@ my %tests = (
 			no_privs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -415,6 +423,7 @@ my %tests = (
 			no_privs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -449,6 +458,7 @@ my %tests = (
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			role                     => 1,
 			schema_only              => 1,
 			section_pre_data         => 1,
@@ -639,6 +649,7 @@ my %tests = (
 			section_post_data        => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			role                     => 1, }, },
 
 	'ALTER OPERATOR CLASS dump_test.op_class OWNER TO' => {
@@ -693,6 +704,7 @@ my %tests = (
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -724,6 +736,7 @@ my %tests = (
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -833,6 +846,7 @@ my %tests = (
 			data_only                => 1,
 			exclude_test_table       => 1,
 			exclude_dump_test_schema => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -866,6 +880,7 @@ my %tests = (
 			data_only                => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			section_data             => 1,
@@ -1059,6 +1074,7 @@ my %tests = (
 			no_blobs                 => 1,
 			no_privs                 => 1,
 			no_owner                 => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			role                     => 1,
 			schema_only              => 1,
@@ -1128,6 +1144,7 @@ my %tests = (
 			no_privs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			schema_only              => 1,
 			section_pre_data         => 1,
@@ -1426,6 +1443,7 @@ qr/^ALTER (?!EVENT TRIGGER|LARGE OBJECT|PUBLICATION|SUBSCRIPTION)(.*) OWNER TO .
 			column_inserts           => 1,
 			data_only                => 1,
 			no_owner                 => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			section_data             => 1,
@@ -1438,6 +1456,7 @@ qr/^ALTER (?!EVENT TRIGGER|LARGE OBJECT|PUBLICATION|SUBSCRIPTION)(.*) OWNER TO .
 		like   => {},    # use more-specific options above
 		unlike => {
 			column_inserts           => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			section_data             => 1, }, },
@@ -1469,6 +1488,7 @@ qr/^ALTER (?!EVENT TRIGGER|LARGE OBJECT|PUBLICATION|SUBSCRIPTION)(.*) OWNER TO .
 			no_blobs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -1505,6 +1525,7 @@ qr/^ALTER (?!EVENT TRIGGER|LARGE OBJECT|PUBLICATION|SUBSCRIPTION)(.*) OWNER TO .
 			no_blobs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -1843,6 +1864,7 @@ qr/^COMMENT ON CONVERSION test_conversion IS 'comment on test conversion';/m,
 			no_blobs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -1878,6 +1900,7 @@ qr/^COMMENT ON CONVERSION test_conversion IS 'comment on test conversion';/m,
 			data_only                => 1,
 			only_dump_test_table     => 1,
 			only_dump_test_schema    => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -1913,6 +1936,7 @@ qr/^COMMENT ON CONVERSION test_conversion IS 'comment on test conversion';/m,
 			data_only                => 1,
 			only_dump_test_table     => 1,
 			only_dump_test_schema    => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -2189,6 +2213,7 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE alt_ts_temp1 IS 'comment on text search temp
 		regexp   => qr/^COMMENT ON /m,
 		like     => {},                  # use more-specific options above
 		unlike   => {
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			section_data             => 1, }, },
@@ -2461,6 +2486,7 @@ qr/^COMMENT ON TEXT SEARCH TEMPLATE alt_ts_temp1 IS 'comment on text search temp
 		unlike   => {
 			binary_upgrade           => 1,
 			column_inserts           => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			schema_only              => 1,
@@ -2541,6 +2567,7 @@ qr/^\QINSERT INTO test_table_identity (col1, col2) OVERRIDING SYSTEM VALUE VALUE
 			section_data             => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			role                     => 1,
 			schema_only              => 1,
 			section_pre_data         => 1,
@@ -2574,6 +2601,7 @@ qr/^\QINSERT INTO test_table_identity (col1, col2) OVERRIDING SYSTEM VALUE VALUE
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			role                     => 1,
 			schema_only              => 1,
 			section_pre_data         => 1,
@@ -2702,6 +2730,7 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
@@ -2737,6 +2766,7 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -2770,6 +2800,7 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
 			no_privs                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
@@ -2822,6 +2853,7 @@ qr/CREATE CAST \(timestamp with time zone AS interval\) WITH FUNCTION pg_catalog
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -2857,6 +2889,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -2900,6 +2933,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -2941,6 +2975,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -2981,6 +3016,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3021,6 +3057,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3057,6 +3094,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3109,6 +3147,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3147,6 +3186,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3188,6 +3228,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			exclude_test_table       => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3227,6 +3268,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3258,6 +3300,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			no_privs                 => 1,
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			schema_only              => 1,
 			section_pre_data         => 1,
@@ -3304,6 +3347,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3337,6 +3381,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3373,6 +3418,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3462,6 +3508,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3498,6 +3545,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3538,6 +3586,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3575,6 +3624,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3614,6 +3664,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3653,6 +3704,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3691,6 +3743,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3739,6 +3792,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3780,6 +3834,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3813,6 +3868,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3845,6 +3901,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3878,6 +3935,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3922,6 +3980,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3956,6 +4015,7 @@ qr/^\QCREATE DEFAULT CONVERSION test_conversion FOR 'LATIN1' TO 'UTF8' FROM iso8
 			data_only                => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -3991,6 +4051,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 			data_only                => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -4524,6 +4585,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 		unlike => {
 			column_inserts           => 1,
 			data_only                => 1,
+			parallel_discard         => 1,
 			role                     => 1,
 			section_data             => 1,
 			section_pre_data         => 1,
@@ -4559,6 +4621,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 			exclude_dump_test_schema => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			test_schema_plus_blobs   => 1, }, },
@@ -5379,9 +5442,10 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 		regexp   => qr/^CREATE /m,
 		like     => {},              # use more-specific options above
 		unlike   => {
-			column_inserts => 1,
-			data_only      => 1,
-			section_data   => 1, }, },
+			column_inserts   => 1,
+			data_only        => 1,
+			parallel_discard => 1,
+			section_data     => 1, }, },
 
 	'DROP SCHEMA public (for testing without public schema)' => {
 		all_runs     => 1,
@@ -5392,7 +5456,8 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 		like         => {},
 		unlike       => {
 			defaults_no_public       => 1,
-			defaults_no_public_clean => 1, } },
+			defaults_no_public_clean => 1,
+			parallel_discard         => 1, } },
 
 	'DROP SCHEMA public' => {
 		all_runs  => 1,
@@ -5434,6 +5499,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 		like   => { clean => 1, },
 		unlike => {
 			clean_if_exists          => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals_clean => 1, }, },
 
 	'DROP LANGUAGE pltestlang' => {
@@ -5618,6 +5684,7 @@ qr/CREATE TRANSFORM FOR integer LANGUAGE sql \(FROM SQL WITH FUNCTION pg_catalog
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			pg_dumpall_globals       => 1,
 			role                     => 1,
@@ -6293,6 +6360,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 			section_pre_data         => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
 			section_data             => 1,
@@ -6305,6 +6373,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 		like     => {},             # use more-specific options above
 		unlike   => {
 			no_privs                 => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals_clean => 1,
 			section_data             => 1,
 			section_post_data        => 1, }, },
@@ -6333,6 +6402,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -6368,6 +6438,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 			data_only                => 1,
 			exclude_dump_test_schema => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
 			role                     => 1,
@@ -6397,6 +6468,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
@@ -6430,6 +6502,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 			no_owner                 => 1,
 			only_dump_test_schema    => 1,
 			only_dump_test_table     => 1,
+			parallel_discard         => 1,
 			pg_dumpall_dbprivs       => 1,
 			pg_dumpall_globals       => 1,
 			pg_dumpall_globals_clean => 1,
@@ -6609,6 +6682,7 @@ qr/^GRANT SELECT ON TABLE measurement_y2006m2 TO regress_dump_test_role;/m,
 			column_inserts     => 1,
 			data_only          => 1,
 			no_privs           => 1,
+			parallel_discard   => 1,
 			pg_dumpall_globals => 1, }, },);
 
 #########################################
@@ -6845,7 +6919,12 @@ foreach my $run (sort keys %pgdump_runs)
 		$test_key = $pgdump_runs{$run}->{test_key};
 	}
 
-	my $output_file = slurp_file("$tempdir/${run}.sql");
+	my $output_file;
+
+	if (-f "$tempdir/${run}.sql")
+	{
+		$output_file = slurp_file("$tempdir/${run}.sql");
+	}
 
 	#########################################
 	# Run all tests where this run is included
-- 
2.14.2

