Skip to content

Commit 54c2ecb

Browse files
committed
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
1 parent e51bad8 commit 54c2ecb

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/bin/pg_ctl/t/001_start_stop.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
'configure authentication');
2525
open my $conf, '>>', "$tempdir/data/postgresql.conf";
2626
print $conf "fsync = off\n";
27+
print $conf TestLib::slurp_file($ENV{TEMP_CONFIG})
28+
if defined $ENV{TEMP_CONFIG};
2729
if (!$windows_os)
2830
{
2931
print $conf "listen_addresses = ''\n";

src/test/perl/PostgresNode.pm

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,17 @@ sub init
452452
print $conf "log_statement = all\n";
453453
print $conf "log_replication_commands = on\n";
454454
print $conf "wal_retrieve_retry_interval = '500ms'\n";
455-
print $conf "port = $port\n";
455+
456+
# If a setting tends to affect whether tests pass or fail, print it after
457+
# TEMP_CONFIG. Otherwise, print it before TEMP_CONFIG, thereby permitting
458+
# overrides. Settings that merely improve performance or ease debugging
459+
# belong before TEMP_CONFIG.
460+
print $conf TestLib::slurp_file($ENV{TEMP_CONFIG})
461+
if defined $ENV{TEMP_CONFIG};
462+
463+
# XXX Neutralize any stats_temp_directory in TEMP_CONFIG. Nodes running
464+
# concurrently must not share a stats_temp_directory.
465+
print $conf "stats_temp_directory = 'pg_stat_tmp'\n";
456466

457467
if ($params{allows_streaming})
458468
{
@@ -478,6 +488,7 @@ sub init
478488
print $conf "max_wal_senders = 0\n";
479489
}
480490

491+
print $conf "port = $port\n";
481492
if ($use_tcp)
482493
{
483494
print $conf "unix_socket_directories = ''\n";

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy