From 6c39a0199ebeef3dafded935bc0d338690549eb4 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari Date: Mon, 3 Aug 2026 04:13:03 +0000 Subject: [PATCH v1] Avoid unnecessary server restarts in the Kerberos TAP test gss_accept_delegation is a PGC_SIGHUP parameter, and pg_hba.conf and pg_ident.conf are re-read on SIGHUP, so reloading the server is enough after changing any of them. Replace the restarts in the Kerberos authentication test with reloads, as already done via reset_pg_hba() in src/test/authentication. This shortens the test without reducing coverage. --- src/test/kerberos/t/001_auth.pl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl index d4018acde88..1601bdda1b2 100644 --- a/src/test/kerberos/t/001_auth.pl +++ b/src/test/kerberos/t/001_auth.pl @@ -175,7 +175,7 @@ $node->append_conf( local all test2 scram-sha-256 host all all $hostaddr/32 gss map=mymap }); -$node->restart; +$node->reload; test_access($node, 'test1', 'SELECT true', 2, '', 'fails without ticket'); @@ -192,7 +192,7 @@ test_access( "no match in usermap \"mymap\" for user \"test1\""); $node->append_conf('pg_ident.conf', qq{mymap /^(.*)\@$realm\$ \\1}); -$node->restart; +$node->reload; test_access( $node, @@ -346,7 +346,7 @@ test_access( ); $node->append_conf('postgresql.conf', qq{gss_accept_delegation=off}); -$node->restart; +$node->reload; test_access( $node, @@ -370,7 +370,7 @@ test_access( ); $node->append_conf('postgresql.conf', qq{gss_accept_delegation=on}); -$node->restart; +$node->reload; test_access( $node, @@ -510,7 +510,7 @@ $node->append_conf( local all test2 scram-sha-256 hostnogssenc all all $hostaddr/32 gss map=mymap }); -$node->restart; +$node->reload; test_access( $node, @@ -602,7 +602,7 @@ $node->append_conf( local all test2 scram-sha-256 host all all $hostaddr/32 gss include_realm=0 }); -$node->restart; +$node->reload; test_access( $node, @@ -637,7 +637,7 @@ $node->append_conf( local all test2 scram-sha-256 host all all $hostaddr/32 gss include_realm=0 krb_realm=EXAMPLE.ORG }); -$node->restart; +$node->reload; test_access( $node, -- 2.43.0