mirror of
https://github.com/postgres/postgres.git
synced 2025-08-08 06:02:22 +03:00
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
This commit is contained in:
@@ -8,7 +8,7 @@ use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
|
||||
my $tempdir = PostgreSQL::Test::Utils::tempdir;
|
||||
my $tempdir = PostgreSQL::Test::Utils::tempdir;
|
||||
my $tempdir_short = PostgreSQL::Test::Utils::tempdir_short;
|
||||
|
||||
program_help_ok('pg_ctl');
|
||||
|
@@ -14,8 +14,8 @@ use Time::HiRes qw(usleep);
|
||||
sub fetch_file_name
|
||||
{
|
||||
my $logfiles = shift;
|
||||
my $format = shift;
|
||||
my @lines = split(/\n/, $logfiles);
|
||||
my $format = shift;
|
||||
my @lines = split(/\n/, $logfiles);
|
||||
my $filename = undef;
|
||||
foreach my $line (@lines)
|
||||
{
|
||||
@@ -33,11 +33,11 @@ sub check_log_pattern
|
||||
{
|
||||
local $Test::Builder::Level = $Test::Builder::Level + 1;
|
||||
|
||||
my $format = shift;
|
||||
my $format = shift;
|
||||
my $logfiles = shift;
|
||||
my $pattern = shift;
|
||||
my $node = shift;
|
||||
my $lfname = fetch_file_name($logfiles, $format);
|
||||
my $pattern = shift;
|
||||
my $node = shift;
|
||||
my $lfname = fetch_file_name($logfiles, $format);
|
||||
|
||||
my $max_attempts = 10 * $PostgreSQL::Test::Utils::timeout_default;
|
||||
|
||||
@@ -100,8 +100,8 @@ csvlog log/postgresql-.*csv
|
||||
jsonlog log/postgresql-.*json$|,
|
||||
'current_logfiles is sane');
|
||||
|
||||
check_log_pattern('stderr', $current_logfiles, 'division by zero', $node);
|
||||
check_log_pattern('csvlog', $current_logfiles, 'division by zero', $node);
|
||||
check_log_pattern('stderr', $current_logfiles, 'division by zero', $node);
|
||||
check_log_pattern('csvlog', $current_logfiles, 'division by zero', $node);
|
||||
check_log_pattern('jsonlog', $current_logfiles, 'division by zero', $node);
|
||||
|
||||
# Sleep 2 seconds and ask for log rotation; this should result in
|
||||
@@ -131,8 +131,8 @@ jsonlog log/postgresql-.*json$|,
|
||||
# Verify that log output gets to this file, too
|
||||
$node->psql('postgres', 'fee fi fo fum');
|
||||
|
||||
check_log_pattern('stderr', $new_current_logfiles, 'syntax error', $node);
|
||||
check_log_pattern('csvlog', $new_current_logfiles, 'syntax error', $node);
|
||||
check_log_pattern('stderr', $new_current_logfiles, 'syntax error', $node);
|
||||
check_log_pattern('csvlog', $new_current_logfiles, 'syntax error', $node);
|
||||
check_log_pattern('jsonlog', $new_current_logfiles, 'syntax error', $node);
|
||||
|
||||
$node->stop();
|
||||
|
Reference in New Issue
Block a user