1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Honor TEMP_CONFIG in TAP suites.

The buildfarm client uses TEMP_CONFIG to implement its extra_config
setting.  Except for stats_temp_directory, extra_config now applies to
TAP suites; extra_config values seen in the past month are compatible
with this.  Back-patch to 9.6, where PostgresNode was introduced, so the
buildfarm can rely on it sooner.

Reviewed by Andrew Dunstan and Tom Lane.

Discussion: https://postgr.es/m/20181229021950.GA3302966@rfd.leadboat.com
This commit is contained in:
Noah Misch
2019-05-11 00:22:38 -07:00
parent 0c132d4581
commit 8dab099bb4
2 changed files with 14 additions and 1 deletions

View File

@ -22,6 +22,8 @@ command_ok([ $ENV{PG_REGRESS}, '--config-auth', "$tempdir/data" ],
'configure authentication'); 'configure authentication');
open CONF, ">>$tempdir/data/postgresql.conf"; open CONF, ">>$tempdir/data/postgresql.conf";
print CONF "fsync = off\n"; print CONF "fsync = off\n";
print CONF TestLib::slurp_file($ENV{TEMP_CONFIG})
if defined $ENV{TEMP_CONFIG};
if (!$windows_os) if (!$windows_os)
{ {
print CONF "listen_addresses = ''\n"; print CONF "listen_addresses = ''\n";

View File

@ -419,7 +419,17 @@ sub init
print $conf "restart_after_crash = off\n"; print $conf "restart_after_crash = off\n";
print $conf "log_statement = all\n"; print $conf "log_statement = all\n";
print $conf "wal_retrieve_retry_interval = '500ms'\n"; print $conf "wal_retrieve_retry_interval = '500ms'\n";
print $conf "port = $port\n";
# If a setting tends to affect whether tests pass or fail, print it after
# TEMP_CONFIG. Otherwise, print it before TEMP_CONFIG, thereby permitting
# overrides. Settings that merely improve performance or ease debugging
# belong before TEMP_CONFIG.
print $conf TestLib::slurp_file($ENV{TEMP_CONFIG})
if defined $ENV{TEMP_CONFIG};
# XXX Neutralize any stats_temp_directory in TEMP_CONFIG. Nodes running
# concurrently must not share a stats_temp_directory.
print $conf "stats_temp_directory = 'pg_stat_tmp'\n";
if ($params{allows_streaming}) if ($params{allows_streaming})
{ {
@ -433,6 +443,7 @@ sub init
print $conf "max_connections = 10\n"; print $conf "max_connections = 10\n";
} }
print $conf "port = $port\n";
if ($use_tcp) if ($use_tcp)
{ {
print $conf "unix_socket_directories = ''\n"; print $conf "unix_socket_directories = ''\n";