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 1hD1VI-0007qJ-2r for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2019 06:42:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hD1VG-0003FW-C9 for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Apr 2019 06:42:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hD1VF-0003FI-Rc for pgsql-hackers@lists.postgresql.org; Sun, 07 Apr 2019 06:42:06 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hD1VC-0000iq-1G for pgsql-hackers@postgresql.org; Sun, 07 Apr 2019 06:42:04 +0000 Received: by mail-pf1-x431.google.com with SMTP id y13so5703889pfm.11 for ; Sat, 06 Apr 2019 23:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f0mVfOanRRxTtlkHILIk2jaRIElb8Q78l8Zo4jXwcEk=; b=Kfs6gKwXcD7rRHbvZYi/Fpmjc5tsyQ9Ae0qai4cgRGq5JB3Sm538cz0EcGEyZrjgQn JM7UeNkb2pGZBT0dewnFBP92DeIUP3mqzYHzcngTBePEoozUrDu2ExBXBqYlrf8QAP1f xM/F1z8OHaWrzJ4OJpIgOqnGBRBmgj0k3JiSc= 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=f0mVfOanRRxTtlkHILIk2jaRIElb8Q78l8Zo4jXwcEk=; b=DEdtyBFXQHe9AmwcevZjWSghc1EbyW2PjAMTqknUnjwKxL2MKiF/0yBfdM6QWVZZ5q OZVWh53Sr51nZl+nWTv2XDpwdZ+6U6ZTJb9eB0UgJHi4nFXPHtC4pQOWg4Vw8oU9/qLZ r5upnZNwEwcxlUQYhpVwZffByl2A1B5C8KBu1VYjsYz1+GdEKjfegibxto0jlXmEG6r7 L4VRn0ytM6s/YmdTjLAkAvTpzuMhE/wCO/2XIfToaO45Be0V6+1dfCwfxQG3bK19k0/S ePr6gIJ6hmIQ0sZL3JJamRNu2hROqfVrzBbzfTmZyZ2vUqPAdRZGquAa966m0R5XMWKl 6Vag== X-Gm-Message-State: APjAAAWfCWlPnWufK8YkvDMXtjQuSHu/aIfb0ol/pUk9jlPL1zeQug4o sMO//OH9WblbQGJUe2e+CGV0sA== X-Google-Smtp-Source: APXvYqxTGB3CqCSpXwwVaH0ZBWY69Zvd5o3acYMPhisJ9CKz/zyjzeg8AnMhQbBZsK7Qchtx1Bj92Q== X-Received: by 2002:a63:c45:: with SMTP id 5mr21718728pgm.385.1554619319032; Sat, 06 Apr 2019 23:41:59 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id r24sm17318295pfd.120.2019.04.06.23.41.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 23:41:58 -0700 (PDT) Date: Sat, 6 Apr 2019 23:41:56 -0700 From: Noah Misch To: Andrew Dunstan Cc: Tom Lane , pgsql-hackers@postgresql.org Subject: Re: Augment every test postgresql.conf Message-ID: <20190407064156.GC1914190@rfd.leadboat.com> References: <20181229021950.GA3302966@rfd.leadboat.com> <20181230024014.GA181668@gust.leadboat.com> <16623.1546141591@sss.pgh.pa.us> <20181230055346.GB156585@gust.leadboat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Dec 30, 2018 at 10:32:31AM -0500, Andrew Dunstan wrote: > On 12/30/18 12:53 AM, Noah Misch wrote: > > 2. stats_temp_directory is incompatible with TAP suites that start more than > > one node simultaneously. > The obvious quick fix would be to have PostgresNode.pm set this to the > default after inserting the TEMP_CONFIG file. I'd like to get $SUBJECT in place for variables other than stats_temp_directory, using your quick fix idea. Attached. When its time comes, your stats_temp_directory work can delete that section. --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="TEMP_CONFIG-tap-v2.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..a1143e3 100644 --- a/src/bin/pg_ctl/t/001_start_stop.pl +++ b/src/bin/pg_ctl/t/001_start_stop.pl @@ -24,6 +24,8 @@ command_ok([ $ENV{PG_REGRESS}, '--config-auth', "$tempdir/data" ], 'configure authentication'); open my $conf, '>>', "$tempdir/data/postgresql.conf"; print $conf "fsync = off\n"; +print $conf TestLib::slurp_file($ENV{TEMP_CONFIG}) + if defined $ENV{TEMP_CONFIG}; if (!$windows_os) { print $conf "listen_addresses = ''\n"; diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 81deed9..f576336 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -447,7 +447,17 @@ sub init print $conf "log_statement = all\n"; print $conf "log_replication_commands = on\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}) { @@ -473,6 +483,7 @@ sub init print $conf "max_wal_senders = 0\n"; } + print $conf "port = $port\n"; if ($TestLib::windows_os) { print $conf "listen_addresses = '$host'\n"; --x+6KMIRAuhnl3hBn--