]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix stability issue with new TAP test of pg_createsubscriber
authorMichael Paquier <michael@paquier.xyz>
Fri, 16 Jan 2026 03:12:26 +0000 (12:12 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 16 Jan 2026 03:12:26 +0000 (12:12 +0900)
The test introduced in 639352d904c8 has added a direct pg_ctl command to
start a node, a method that is incompatible with the teardown() routine
used at the end of the test as the PID saved in the Cluster object would
prevent the node to be shut down.  This can ultimately prevent the test
to perform its cleanup, failing on timeout.

Like pg_ctl's 001_start_stop or ssl_passphrase_callback's 001_testfunc,
this commit changes the test so a direct pg_ctl command is used to stop
the rogue node.  That should be hopefully enough to cool down the
buildfarm.

Per report from buildfarm member fairywren, which is the only animal
that is showing this issue.

Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/TY7PR01MB1455452AE9053DD2B77B74FEAF58CA@TY7PR01MB14554.jpnprd01.prod.outlook.com

src/bin/pg_basebackup/t/040_pg_createsubscriber.pl

index e1de946488ed2c4b0aa2c2aa987aa27b43d26303..0c27fca7bb7675a845f0db6c6cb3626bbc5a2691 100644 (file)
@@ -624,11 +624,15 @@ command_ok(
        ],
        "node K has started");
 
+# Note that this uses a direct pg_ctl command rather than a teardown(),
+# because $node->stop() would not work due to the node's postmaster PID
+# not being tracked, something that is set within $node->start().
+system_log('pg_ctl', 'stop', '--pgdata', $node_k->data_dir);
+
 # clean up
 $node_p->teardown_node;
 $node_s->teardown_node;
 $node_t->teardown_node;
 $node_f->teardown_node;
-$node_k->teardown_node;
 
 done_testing();