Run pgindent, pgperltidy, and reformat-dat-files.
The pgindent part of this is pretty small, consisting mainly of
fixing up self-inflicted formatting damage from patches that
hadn't bothered to add their new typedefs to typedefs.list.
In order to keep it from making anything worse, I manually added
a dozen or so typedefs that appeared in the existing typedefs.list
but not in the buildfarm's list. Perhaps we should formalize that,
or better find a way to get those typedefs into the automatic list.
pgperltidy is as opinionated as always, and reformat-dat-files too.
my$default_ts_oid=$node->safe_psql('postgres',q{SELECT oid FROM pg_tablespace WHERE spcname = 'pg_default'});
my$default_ts_oid=$node->safe_psql('postgres',
my$postgres_db_oid=$node->safe_psql('postgres',q{SELECT oid FROM pg_database WHERE datname = 'postgres'});
q{SELECT oid FROM pg_tablespace WHERE spcname = 'pg_default'});
my$rel_t1_oid=$node->safe_psql('postgres',q{SELECT oid FROM pg_class WHERE relname = 't1'});
my$postgres_db_oid=$node->safe_psql('postgres',
my$rel_i1a_oid=$node->safe_psql('postgres',q{SELECT oid FROM pg_class WHERE relname = 'i1a'});
q{SELECT oid FROM pg_database WHERE datname = 'postgres'});
my$rel_t1_oid=$node->safe_psql('postgres',
q{SELECT oid FROM pg_class WHERE relname = 't1'});
my$rel_i1a_oid=$node->safe_psql('postgres',
q{SELECT oid FROM pg_class WHERE relname = 'i1a'});
$node->stop;
$node->stop;
# various ways of specifying WAL range
# various ways of specifying WAL range
command_fails_like(['pg_waldump','foo','bar'],qr/error: could not locate WAL file "foo"/,'start file not found');
command_fails_like(
command_like(['pg_waldump',$node->data_dir.'/pg_wal/'.$start_walfile],qr/./,'runs with start segment specified');
['pg_waldump','foo','bar'],
command_fails_like(['pg_waldump',$node->data_dir.'/pg_wal/'.$start_walfile,'bar'],qr/error: could not open file "bar"/,'end file not found');
qr/error: could not locate WAL file "foo"/,
command_like(['pg_waldump',$node->data_dir.'/pg_wal/'.$start_walfile,$node->data_dir.'/pg_wal/'.$end_walfile],qr/./,'runs with start and end segment specified');
'start file not found');
command_fails_like(['pg_waldump','-p',$node->data_dir],qr/error: no start WAL location given/,'path option requires start location');
command_like(['pg_waldump','-p',$node->data_dir,'--start',$start_lsn,'--end',$end_lsn],qr/./,'runs with path option and start and end locations');
qr/./,'runs with start segment specified');
command_fails_like(['pg_waldump','-p',$node->data_dir,'--start',$start_lsn],qr/error: error in WAL record at/,'falling off the end of the WAL results in an error');
command_like(['pg_waldump','--quiet',$node->data_dir.'/pg_wal/'.$start_walfile],qr/^$/,'no output with --quiet option');
qr/error: could not open file "bar"/,
command_fails_like(['pg_waldump','--quiet','-p',$node->data_dir,'--start',$start_lsn],qr/error: error in WAL record at/,'errors are shown with --quiet');
'end file not found');
command_like(
[
'pg_waldump',
$node->data_dir.'/pg_wal/'.$start_walfile,
$node->data_dir.'/pg_wal/'.$end_walfile
],
qr/./,
'runs with start and end segment specified');
command_fails_like(
['pg_waldump','-p',$node->data_dir],
qr/error: no start WAL location given/,
'path option requires start location');
command_like(
[
'pg_waldump','-p',$node->data_dir,'--start',
$start_lsn,'--end',$end_lsn
],
qr/./,
'runs with path option and start and end locations');