pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Hubert Zhang <zhubert@vmware.com>
Cc: tsunakawa.takay@fujitsu.com, pgsql-hackers@postgresql.org, Andreas Seltenreich <seltenreich@gmx.de>
Cc: Bruce Momjian <bruce@momjian.us>
Subject: Re: Multiple hosts in connection string failed to failover in non-hot standby mode
Date: Tue, 1 Jun 2021 16:34:44 +0900
Message-ID: <YLXjFOV3teAPirmS@paquier.xyz> (raw)
In-Reply-To: <2732890.1622509658@sss.pgh.pa.us>
References: <20210506162651.GJ27406@telsasoft.com>
	<4170264.1620321747@sss.pgh.pa.us>
	<20210531012500.GP2082@telsasoft.com>
	<YLRDV0MqQnGRIo4c@paquier.xyz>
	<YLRZH6CWs9N6Pusy@paquier.xyz>
	<2522602.1622433912@sss.pgh.pa.us>
	<YLSCrAPVfxX3X8ap@paquier.xyz>
	<2566986.1622468180@sss.pgh.pa.us>
	<YLWFzzrUIy9Q8h1d@paquier.xyz>
	<2732890.1622509658@sss.pgh.pa.us>

On Mon, May 31, 2021 at 09:07:38PM -0400, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>>> Agreed, that seems bogus.
> 
>> There may be others, and I have not checked yet.  I'd rather do a
>> backpatch for this part, would you agree?
> 
> +1

Playing with all those variables and broken values here and there, I
have been able to break a bunch of tests.  Most of the failures were
in the authentication and SSL tests, but there were also fancier
cases.  For example, PGCLIENTENCODING would cause a failure with
pg_ctl, for any TAP test.

I got surprised that enforcing values for most of the PGSSL* ones did
not cause a failure when it came to the certs, CRLs keys and root
certs now.  Still, I think that we'd be safer to cancel these as
well.

Attached is the list I am finishing with.  I'd like to fix that, so
please let me know if there are any comments or objections.
--
Michael

Attachments:

  [text/x-diff] testlib-envs.patch (1005B, ../YLXjFOV3teAPirmS@paquier.xyz/2-testlib-envs.patch)
  download | inline diff:
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index d6c3eb8723..d4f9fc5f2b 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -104,13 +104,30 @@ BEGIN
 	delete $ENV{LC_ALL};
 	$ENV{LC_MESSAGES} = 'C';
 
+	delete $ENV{PGCHANNELBINDING};
+	delete $ENV{PGCLIENTENCODING};
 	delete $ENV{PGCONNECT_TIMEOUT};
 	delete $ENV{PGDATA};
 	delete $ENV{PGDATABASE};
+	delete $ENV{PGGSSENCMODE};
+	delete $ENV{PGGSSLIB};
 	delete $ENV{PGHOSTADDR};
+	delete $ENV{PGKRBSRVNAME};
+	delete $ENV{PGPASSFILE};
+	delete $ENV{PGPASSWORD};
+	delete $ENV{PGREQUIREPEER};
 	delete $ENV{PGREQUIRESSL};
 	delete $ENV{PGSERVICE};
+	delete $ENV{PGSERVICEFILE};
+	delete $ENV{PGSSLCERT};
+	delete $ENV{PGSSLCRL};
+	delete $ENV{PGSSLCRLDIR};
+	delete $ENV{PGSSLKEY};
+	delete $ENV{PGSSLMAXPROTOCOLVERSION};
+	delete $ENV{PGSSLMINPROTOCOLVERSION};
 	delete $ENV{PGSSLMODE};
+	delete $ENV{PGSSLROOTCERT};
+	delete $ENV{PGSSLSNI};
 	delete $ENV{PGUSER};
 	delete $ENV{PGPORT};
 	delete $ENV{PGHOST};

  [application/pgp-signature] signature.asc (832B, ../YLXjFOV3teAPirmS@paquier.xyz/3-signature.asc)
  download

view thread (38+ messages)  latest in thread

Message-ID: <YLXjFOV3teAPirmS@paquier.xyz>
Permalink:  ../YLXjFOV3teAPirmS@paquier.xyz/
Also on:    postgresql.org/message-id/YLXjFOV3teAPirmS@paquier.xyz

 ·  · 

reply

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: michael@paquier.xyz, tgl@sss.pgh.pa.us, pryzby@telsasoft.com, zhubert@vmware.com, seltenreich@gmx.de, bruce@momjian.us
  Subject: Re: Multiple hosts in connection string failed to failover in non-hot standby mode
  In-Reply-To: <YLXjFOV3teAPirmS@paquier.xyz>

* 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