mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Fix vacuumdb --analyze-in-stages --all order
When running vacuumdb --analyze-in-stages --all, it needs to run the first stage across all databases before the second one, instead of running all stages in a database before processing the next one. Also respect the --quiet option with --analyze-in-stages.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use TestLib;
|
||||
use Test::More tests => 1;
|
||||
use Test::More tests => 2;
|
||||
|
||||
my $tempdir = tempdir;
|
||||
start_test_server $tempdir;
|
||||
@@ -15,3 +15,20 @@ qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0;
|
||||
.*statement:\ RESET\ default_statistics_target;
|
||||
.*statement:\ ANALYZE/sx,
|
||||
'analyze three times');
|
||||
|
||||
|
||||
issues_sql_like(
|
||||
[ 'vacuumdb', '--analyze-in-stages', '--all' ],
|
||||
qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0;
|
||||
.*statement:\ ANALYZE.*
|
||||
.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0;
|
||||
.*statement:\ ANALYZE.*
|
||||
.*statement:\ SET\ default_statistics_target=10;\ RESET\ vacuum_cost_delay;
|
||||
.*statement:\ ANALYZE.*
|
||||
.*statement:\ SET\ default_statistics_target=10;\ RESET\ vacuum_cost_delay;
|
||||
.*statement:\ ANALYZE.*
|
||||
.*statement:\ RESET\ default_statistics_target;
|
||||
.*statement:\ ANALYZE.*
|
||||
.*statement:\ RESET\ default_statistics_target;
|
||||
.*statement:\ ANALYZE/sx,
|
||||
'analyze more than one database in stages');
|
||||
|
||||
Reference in New Issue
Block a user