From: Noah Misch <noah@leadboat.com>
To: pgsql-hackers@postgresql.org
Subject: Re: Augment every test postgresql.conf
Date: Sat, 29 Dec 2018 21:40:14 -0500
Message-ID: <20181230024014.GA181668@gust.leadboat.com> (raw)
In-Reply-To: <20181229021950.GA3302966@rfd.leadboat.com>
References: <20181229021950.GA3302966@rfd.leadboat.com>
On Fri, Dec 28, 2018 at 06:19:50PM -0800, Noah Misch wrote:
> "env EXTRA_REGRESS_OPTS=--temp-config=SOMEFILE make check" appends the
> contents of SOMEFILE to the test cluster's postgresql.conf. I want a similar
> feature for TAP suites and other non-pg_regress suites. (My immediate use
> case is to raise authentication_timeout and wal_sender_timeout on my buildfarm
> animals, which sometimes fail at the defaults.) I'm thinking to do this by
> recognizing the PG_TEST_TEMP_CONFIG environment variable as a
> whitespace-separated list of file names for appending to postgresql.conf.
Looking more closely, we already have the TEMP_CONFIG variable and apply it to
everything except TAP suites. Closing that gap, as attached, is enough. The
buildfarm client uses TEMP_CONFIG to implement its extra_config setting, so
this will cause extra_config to start applying to TAP suites.
Attachments:
[text/x-diff] TEMP_CONFIG-tap-v1.patch (922B, ../20181230024014.GA181668@gust.leadboat.com/2-TEMP_CONFIG-tap-v1.patch)
download | inline diff:diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.plindex 50a57d0..0c57e9c 100644--- a/src/bin/pg_ctl/t/001_start_stop.pl+++ b/src/bin/pg_ctl/t/001_start_stop.pl@@ -33,6 +33,8 @@ else
{
print $conf "listen_addresses = '127.0.0.1'\n";
}
+print $conf TestLib::slurp_file($ENV{TEMP_CONFIG})+ if defined $ENV{TEMP_CONFIG};
close $conf;
my $ctlcmd = [
'pg_ctl', 'start', '-D', "$tempdir/data", '-l',
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pmindex 8a2c6fc..ce663a1 100644--- a/src/test/perl/PostgresNode.pm+++ b/src/test/perl/PostgresNode.pm@@ -482,6 +482,9 @@ sub init
print $conf "unix_socket_directories = '$host'\n";
print $conf "listen_addresses = ''\n";
}
++ print $conf TestLib::slurp_file($ENV{TEMP_CONFIG})+ if defined $ENV{TEMP_CONFIG};
close $conf;
chmod($self->group_access ? 0640 : 0600, "$pgdata/postgresql.conf")
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: noah@leadboat.com
Subject: Re: Augment every test postgresql.conf
In-Reply-To: <20181230024014.GA181668@gust.leadboat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox