From 9fe0d712b3d5260b6ef39d5d3afca575b08514e1 Mon Sep 17 00:00:00 2001 From: Rahila Syed Date: Thu, 11 Sep 2025 11:56:21 +0530 Subject: [PATCH] Add a test for a disabled GUC check for parallel workers --- .../modules/test_misc/t/009_guc_validation.pl | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/test/modules/test_misc/t/009_guc_validation.pl diff --git a/src/test/modules/test_misc/t/009_guc_validation.pl b/src/test/modules/test_misc/t/009_guc_validation.pl new file mode 100644 index 00000000000..6d7421e414a --- /dev/null +++ b/src/test/modules/test_misc/t/009_guc_validation.pl @@ -0,0 +1,29 @@ + +# Copyright (c) 2024-2025, PostgreSQL Global Development Group + +# Tests to cross-check the consistency of GUC parameters with +# postgresql.conf.sample. + +use strict; +use warnings FATAL => 'all'; +use PostgreSQL::Test::Cluster; +use PostgreSQL::Test::Utils; +use Test::More; + +my $psql_err; +my $node = PostgreSQL::Test::Cluster->new('main'); +$node->init; +$node->append_conf('postgresql.conf', "synchronized_standby_slots = missing"); +# Node starts with invalid synchronized_standby_slots +$node->start; + +# Should not throw an error when parallel worker starts up. + +my $parallel_worker_scan = $node->psql( + 'postgres', qq( SET min_parallel_table_scan_size TO 0; SET parallel_setup_cost TO 0; + SET parallel_tuple_cost TO 0; + SELECT * from pg_namespace;), stderr => \$psql_err); + +like ( $psql_err, + qr//); +done_testing(); -- 2.34.1