Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a341700

Browse files
ashutosh-bapatCommitfest Bot
authored and
Commitfest Bot
committed
Turn off log_statement to save CPU cycles
The test tests pg_dump and pg_upgrade utilities. Hence logging actual statements executed on the server is not worth the CPU cycles spent for that. This is significant in valgrind environment which slows tests down considerably. Author: Alvaro Herrera <alvherre@alvh.no-ip.org> Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> Suggested-by: Andres Freund <andres@anarazel.de>
1 parent 44b6210 commit a341700

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/pg_upgrade/t/002_pg_upgrade.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ sub get_dump_for_comparison
221221

222222
$old_node_params{extra} = \@old_initdb_params;
223223
$oldnode->init(%old_node_params);
224+
# Override log_statement set by Cluster.pm; logged statements are not as useful
225+
# and consume CPU cycles unnecessarily.
226+
$oldnode->append_conf('postgresql.conf', 'log_statement = none');
224227
$oldnode->start;
225228

226229
my $result;
@@ -312,6 +315,8 @@ sub get_dump_for_comparison
312315
push @new_initdb_params, ('--locale-provider', 'libc');
313316
$new_node_params{extra} = \@new_initdb_params;
314317
$newnode->init(%new_node_params);
318+
# Override log_statement set by Cluster.pm; as explained in case of oldnode.
319+
$newnode->append_conf('postgresql.conf', 'log_statement=none');
315320

316321
# Stabilize stats for comparison.
317322
$newnode->append_conf('postgresql.conf', 'autovacuum = off');

0 commit comments

Comments
 (0)