1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Set log_line_prefix and application name in test drivers

Before pg_regress runs psql, set the application name to the test name.
Similarly, set the application name to the test file name in the TAP
tests.  Also, set a default log_line_prefix that show the application
name, as well as the PID and a time stamp.

That way, the server log output can be correlated to the test input
files, making debugging a bit easier.
This commit is contained in:
Peter Eisentraut
2016-09-30 12:00:00 -04:00
parent f002ed2b8e
commit a4327296df
4 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,8 @@ BEGIN
delete $ENV{PGPORT};
delete $ENV{PGHOST};
$ENV{PGAPPNAME} = $0;
# Must be set early
$windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys';
}