Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdR1p-0005pl-W6 for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Dec 2018 02:40:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gdR1m-0006QN-7T for pgsql-hackers@arkaria.postgresql.org; Sun, 30 Dec 2018 02:40:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdR1l-0006QB-Kx for pgsql-hackers@lists.postgresql.org; Sun, 30 Dec 2018 02:40:34 +0000 Received: from mail-it1-x143.google.com ([2607:f8b0:4864:20::143]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gdR1e-00014L-H4 for pgsql-hackers@postgresql.org; Sun, 30 Dec 2018 02:40:32 +0000 Received: by mail-it1-x143.google.com with SMTP id m62so32781025ith.5 for ; Sat, 29 Dec 2018 18:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=36HmnoRo7GMuqT0X0dwUBg2FNWquMgVdnyXiRlpvf2o=; b=QuLqkzbswTZCQLQPh91D5dD78ypNIRXEn5OQrwqQH+6jxgmCR13stGEo1uzVnhHeX8 AJR70LfvzOiFSlZbeGSqDnfI2XpIwTQMkJhxMqRvyQqcXNyEglNlRaQzcuK5k9F1GbQU 3vrFywLOFa/KdRofjoY7N/y/wZEtknqsSIK6M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=36HmnoRo7GMuqT0X0dwUBg2FNWquMgVdnyXiRlpvf2o=; b=dskL3OVhu4wcL3zVLAwbIJldNL81JbtHgkepI+M2S5DlRX1HazruBSXzmSO3kd74Zi XlrrJSaEuMA5Hto3oALFIHTWPCQznlxkP6tuo7cvASMKJ+9CD42CDZUVQAUv2LmZ7Td7 v1QdMV5IydgpvhVO+p8E/SwL9LrT4YUxVY2y+CDCuxKGjK+2xvEW9T22X0JixTKEj4xc Xl3wP3WDrQ+tTDmLgLyJZvJwNG3BH9HEe3RoF3I3jpYRrrb2xZk9RVWrGn/C4tqbCBkk CoOqUlWAK8axpoXI/xA2vcv2ITVI8lAmpAl2pxV3GwG6CU41odEk6RgQQ7HlGch7v2Od xbhQ== X-Gm-Message-State: AA+aEWbXLwlFk7ScDSkOJ2fxE+wpq2xw0+aCJnwF517gzDJSt8QLQMIJ Nubzxbpfw1Kt8hFBcutyK60/FyH7GbU= X-Google-Smtp-Source: ALg8bN56bsvUiyPS+4k1HaTXsfltMZLsXNfaLf7Q5ffWY42tnmZkiXgCxAA7GEfH/aVxbmMnnlxYYQ== X-Received: by 2002:a05:660c:a8f:: with SMTP id m15mr20755597itk.114.1546137625238; Sat, 29 Dec 2018 18:40:25 -0800 (PST) Received: from gust.leadboat.com ([172.243.182.239]) by smtp.gmail.com with ESMTPSA id 197sm17749217itx.21.2018.12.29.18.40.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Dec 2018 18:40:24 -0800 (PST) Date: Sat, 29 Dec 2018 21:40:14 -0500 From: Noah Misch To: pgsql-hackers@postgresql.org Subject: Re: Augment every test postgresql.conf Message-ID: <20181230024014.GA181668@gust.leadboat.com> References: <20181229021950.GA3302966@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <20181229021950.GA3302966@rfd.leadboat.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --jI8keyz6grp/JLjh Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="TEMP_CONFIG-tap-v1.patch" diff --git a/src/bin/pg_ctl/t/001_start_stop.pl b/src/bin/pg_ctl/t/001_start_stop.pl index 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.pm index 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") --jI8keyz6grp/JLjh--