Set log_statement=none in t/002_pg_upgrade.pl

This should make the test a wee bit faster on high-load machines (e.g.,
when running under valgrind).

Per complaint from Andres Freund.

Discussion: https://postgr.es/m/cwbcyjp2ts7o7xgy5y5gwtcd4zltvncsj67el7xgci7xbwrhlu@k363vk5tce4g
This commit is contained in:
Álvaro Herrera 2025-04-05 11:41:01 +02:00
parent 4be6a74cfb
commit 64fba9c617
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE

View File

@ -221,6 +221,9 @@ push @old_initdb_params, '-k' if $oldnode->pg_version < 18;
$old_node_params{extra} = \@old_initdb_params;
$oldnode->init(%old_node_params);
# Override log_statement=all set by Cluster.pm. This avoids large amounts
# of log traffic that slow this test down even more when run under valgrind.
$oldnode->append_conf('postgresql.conf', 'log_statement = none');
$oldnode->start;
my $result;
@ -312,6 +315,8 @@ push @new_initdb_params, ('--encoding', 'SQL_ASCII');
push @new_initdb_params, ('--locale-provider', 'libc');
$new_node_params{extra} = \@new_initdb_params;
$newnode->init(%new_node_params);
# Avoid unnecessary log noise
$newnode->append_conf('postgresql.conf', 'log_statement = none');
# Stabilize stats for comparison.
$newnode->append_conf('postgresql.conf', 'autovacuum = off');
@ -379,6 +384,8 @@ SKIP:
# source cluster to avoid any differences between dumps taken from both the
# clusters caused by differences in their configurations.
$dstnode->init(%old_node_params);
# Avoid unnecessary log noise
$dstnode->append_conf('postgresql.conf', 'log_statement = none');
# Stabilize stats for comparison.
$dstnode->append_conf('postgresql.conf', 'autovacuum = off');
$dstnode->start;