2014-04-15 05:15:05 +02:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use TestLib;
|
2014-09-12 03:08:59 +02:00
|
|
|
use Test::More tests => 2;
|
2014-04-15 05:15:05 +02:00
|
|
|
|
|
|
|
my $tempdir = tempdir;
|
|
|
|
start_test_server $tempdir;
|
|
|
|
|
2014-05-06 18:12:18 +02:00
|
|
|
issues_sql_like(
|
|
|
|
[ 'vacuumdb', '--analyze-in-stages', 'postgres' ],
|
|
|
|
qr/.*statement:\ SET\ default_statistics_target=1;\ SET\ vacuum_cost_delay=0;
|
2014-04-15 05:15:05 +02:00
|
|
|
.*statement:\ ANALYZE.*
|
|
|
|
.*statement:\ SET\ default_statistics_target=10;\ RESET\ vacuum_cost_delay;
|
|
|
|
.*statement:\ ANALYZE.*
|
|
|
|
.*statement:\ RESET\ default_statistics_target;
|
|
|
|
.*statement:\ ANALYZE/sx,
|
2014-05-06 18:12:18 +02:00
|
|
|
'analyze three times');
|
2014-09-12 03:08:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
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');
|