Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJWIW-0007SW-Vp for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 08:01:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nJWIV-0007V9-TX for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Feb 2022 08:01:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJWIU-0007V0-FH for pgsql-hackers@lists.postgresql.org; Mon, 14 Feb 2022 08:01:23 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nJWIR-0002p6-KV for pgsql-hackers@lists.postgresql.org; Mon, 14 Feb 2022 08:01:21 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C54525C00B2; Mon, 14 Feb 2022 03:01:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 14 Feb 2022 03:01:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=/Kgx7HmhSyoRSlLkT4PiR5oRbgftEnWsoo0XKL KwGTs=; b=f5Jop2ne1gT580ar0KZwT2oFwt9lv7WF5K8L0WDDc8CNl474V4pfXl BPqvMqnUqvoGJvRflF+6DGPIIdb21fPR3rRZ1dWvh6rgn+2U05RBgNfkpnKx2297 jZbTVbba6G3ylTZjQjmUaSNoYDK61KZ3xkZDY8ivv76idIGMDPN7Mew0Gsp/bENO wVT5QwTgrUxpZSVFpzckyPIsPcyqrhWorijBPbIbpiKhX3du6oSjPdYWjyUupOLg GCMmxHqVKG9C7oRMTZrz+sEh5t5rIs5ZvidCZtHL074aaHXlOYWv/aaRnUA/gIgQ CuvQkYfO/gS0f/wGSJv85gELd5IdxAYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/Kgx7HmhSyoRSlLkT 4PiR5oRbgftEnWsoo0XKLKwGTs=; b=oM+pq+0hjEFAWcl/N9fYh+KhMF3ODggCP v44KgO7bN3hxbtjCM2iSCpgLa0SCIDBFFidMn4Wn1PKzUSWu+XGxBuzfy6o25+Qi YM5BFID0raAdnEpjGqyKjTn2tnOQisuHDeiCWofQ34QxnhuzXynMLc9a7YXlUYyn 8aQLs9tXP33TmC5zzOqfi6FG1fRYC+AFc0l8O5B+ArDe7yo8v66ZPGskw+1pAKPc 7RUgihijDlDQQe247XugAr6SDGVESFB74WnSGeBh0Nf62IsU62nfZNki4+PGvmLV peD8ZqHrRgBCMXm0yyVVbs+RJbx/jvh0O8ro81yC4zhQi70+0QZKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjedugdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Feb 2022 03:01:15 -0500 (EST) Date: Mon, 14 Feb 2022 17:01:05 +0900 From: Michael Paquier To: Andres Freund Cc: Julien Rouhaud , Tom Lane , Andrew Dunstan , Postgres hackers Subject: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set Message-ID: References: <20211214020824.azjrighbeucby5yc@alap3.anarazel.de> <20211214061449.ynrygtcddn3ujunn@alap3.anarazel.de> <20220115055239.6i5mp7ujtcpto2mg@jrouhaud> <20220213041242.xhpixy3kwwmswkfk@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VlRgIPhI8OlLo0la" Content-Disposition: inline In-Reply-To: <20220213041242.xhpixy3kwwmswkfk@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --VlRgIPhI8OlLo0la Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 12, 2022 at 08:12:42PM -0800, Andres Freund wrote: > It also doesn't handle @ correctly. Makes sense to fix. Should probably u= se > the same logic that libpq, psql, ... use? >=20 > if (is_unixsock_path(ch->host)) > ch->type =3D CHT_UNIX_SOCKET; >=20 > that'd basically be the same amount of code. And easier to understand. So, I am catching up with some parts of this thread, and I have managed to miss is_unixsock_path(). Except if I am missing something (now it is close to the end of the day here), a minimal change would be something like that as we'd still want to allow the use of localhost and others: if (value && strlen(value) > 0 && /* check for 'local' host values */ (strcmp(value, "localhost") !=3D 0 && strcmp(value, "127.0.0.1") != =3D 0 && - strcmp(value, "::1") !=3D 0 && value[0] !=3D '/')) + strcmp(value, "::1") !=3D 0 && !is_unixsock_path(value))) Or perhaps we should restrict more the use of localhost values for non-WIN32? Opinions? -- Michael --VlRgIPhI8OlLo0la Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmIKDEEACgkQnvQgOdby QH1ePQ/9G4sMoyx+O4CN31k+Sy/Zn1QTfDpJzUMGVU3WF1K83b2/jwQ6wAOagYSD utv0infjm4v7PDyR2TkYG19Xx2tBOlPlGex5AFoyIBkCh0C0A1fkjRiZADp1By5h gZbHyBmZ+fJFyMF7A71M5uQsrUcu3bIYqfuasOAZ/ZHmS8Yv+xwX5ZKhJbT3wjaL BMdITKdoub5fsBb7D/McjvMs2oAD3rAVp7TOy/d9/xMAQWB4oQ2w3XxszlU3iUWk HSWBebKrji7tDfBdd9XeXQoKNzIP1IqreZfkbGS8MvRdwpgww86W014ogvf50/iE SJZb/gbXvHljI6pYD9t1is+cIfL9JCwMlytqd4Emk74dwZ3QxxplrmM5IIYuWjSX GjA77Ni2bi7a5R1gPINQhIwu/eQjaH9LLTqO53lPax3fXlKkp4yGbbOdv7lKSBlf cfU80e8YtaE3r9zGAU1nGui8s810mhq58YyIcIo+bsZjjYV21G7f8p0ReyYPsS7w gwxOEf8Elv5RXQQvzRVyVv6wJQv+EzmzFOX8OPtEh3/eql83jRMdlz9F2E71ycT4 uSv5ysp8R+y0KCG4UxYatppigAziRuN0aVzQ8jVboyJjytRZ5nU11+ZHphPdS3qM Wt5fvlWg8FOYlfjwV19KbwstWrEdPJXBeWcGHMuf44nlVoMTcoY= =J8Vy -----END PGP SIGNATURE----- --VlRgIPhI8OlLo0la--