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 1o8AzK-0005Cv-Mr for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Jul 2022 01:34:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o8AzH-0000vJ-JA for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Jul 2022 01:34:55 +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 1o8AzG-0000uJ-JY for pgsql-hackers@lists.postgresql.org; Mon, 04 Jul 2022 01:34:55 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8AzD-0006j3-1B for pgsql-hackers@lists.postgresql.org; Mon, 04 Jul 2022 01:34:53 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D5F555C00C6; Sun, 3 Jul 2022 21:34:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 03 Jul 2022 21:34:49 -0400 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=fm2; t=1656898489; x=1656984889; bh=DtBSBfkxoB 7pkqlDV5WbsdU9hMOgZDiqMWWFd9ZlyL8=; b=ZXs5Md8MyR4Y3Upf1V+N8AHUe9 5pLfG/qskNY/GKHCbo0dTUA5xIMU4qhPWVDIXF59BM/uLZP6yqLJNkMPzrFGIWEy GTpc0IqG4k4sxyFiVYRfxDkNwLNa0yozFmBAVmPcA9LA+MjSn0mDu4OW7zdGosZh G81CtaPe/3aUqx7osyBnmza19bf6S9rgYauxrs6lNH/6Gcl6zjUHyUfFZ9RPGEmL nAp60VvGR0xRajkYGhkI4GN/GM2gtl4fIU9iCQVsqfXRzYdyJeRAs4cwFNu8mCbH n/4EqUlSgZEb+ZS28BEXvIfQ77Fprl6toXzw4TG2T+seCy8twBt5IC5QIkwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id: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; t=1656898489; x=1656984889; bh=DtBSBfkxoB7pkqlDV5WbsdU9hMOg ZDiqMWWFd9ZlyL8=; b=P/C3bAfGvhcBeKauXZjp3U8iQckLiEZ99S0fM2KTG/JT MoyJ+oSkAKG/ACL29f79PDR+xddveacDMiCtBfxVsUVyBTLJ61zMc/1hWKXxEEqN eSYUrY8nkrX90VCJprFJ8jyQPpv7kfPIR5pSkaJNxYERZQMfpbNRHffnIoX1bhQd yvrc2/4T54R6iZ1/H3HgYBcmlohFD0GZbKS3Jy45ktp5gdWTdINBVRGa3jWgMEjw CUZBPxtlbbgg+e0CoLp62cqKU+0ufSVdp9NfruWQOFFL1cypFXm9M1l/959YIG4n RKxLKC+hzrOgKI+lbvutsNc0Hcne5cU7EV3LpOB+KQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehkedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 3 Jul 2022 21:34:46 -0400 (EDT) Date: Mon, 4 Jul 2022 10:34:42 +0900 From: Michael Paquier To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org, Noah Misch Subject: Re: Too-long socket paths are breaking several buildfarm members Message-ID: References: <1410025.1656890531@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2GXcf8cddNDwCbc3" Content-Disposition: inline In-Reply-To: <1410025.1656890531@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2GXcf8cddNDwCbc3 Content-Type: multipart/mixed; boundary="pFUczZf6j50rWKP1" Content-Disposition: inline --pFUczZf6j50rWKP1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jul 03, 2022 at 07:22:11PM -0400, Tom Lane wrote: > That path name is 3 bytes over the platform limit. Evidently, > "REL_15_STABLE" is just enough longer than "HEAD" to make this fail, > whereas we didn't see the problem as long as the test case only > ran in HEAD. That tells enough about UNIXSOCK_PATH_BUFLEN. It looks like test.sh has been using for ages /tmp/pg_upgrade_check* as socket directory to counter this issue. > Members butterflyfish, massasauga, and myna likewise have yet to pass > this test in REL_15_STABLE, though they're perfectly happy in HEAD. > They are returning cut-down logs that don't allow diagnosing for > certain, but a reasonable bet is that it's the same kind of problem. Hmm. That's possible. > I think that the conversion of pg_upgrade's test script to TAP > form missed a bet. IIRC, we have mechanism somewhere to ensure > that test socket path names are created under /tmp, or someplace else > that's not subject to possibly-long paths of installation directories. > That's evidently not being used here. There is PostgreSQL::Test::Utils::tempdir_short for that, which is what all the nodes created in Cluster.pm use for unix_socket_directories. One way to address the issue would be to pass that to pg_upgrade with --socketdir, as of the attached. -- Michael --pFUczZf6j50rWKP1 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="upgrade-tap-shorttemp.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/= 002_pg_upgrade.pl index 67e0be6856..8dbda0950e 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -216,6 +216,9 @@ chdir ${PostgreSQL::Test::Utils::tmp_check}; # Upgrade the instance. $oldnode->stop; =20 +# Use a short path for socket directories. +my $socketdir =3D PostgreSQL::Test::Utils::tempdir_short; + # Cause a failure at the start of pg_upgrade, this should create the loggi= ng # directory pg_upgrade_output.d but leave it around. Keep --check for an # early exit. @@ -228,6 +231,7 @@ command_fails( '-B', $newbindir, '-p', $oldnode->port, '-P', $newnode->port, + '-s', $socketdir, '--check' ], 'run of pg_upgrade --check for new instance with incorrect binary path'); @@ -241,7 +245,8 @@ command_ok( 'pg_upgrade', '--no-sync', '-d', $oldnode->data_dir, '-D', $newnode->data_dir, '-b', $oldbindir, '-B', $newbindir, '-p', $oldnode->port, - '-P', $newnode->port, '--check' + '-P', $newnode->port, '-s', $socketdir, + '--check' ], 'run of pg_upgrade --check for new instance'); ok(!-d $newnode->data_dir . "/pg_upgrade_output.d", @@ -253,7 +258,7 @@ command_ok( 'pg_upgrade', '--no-sync', '-d', $oldnode->data_dir, '-D', $newnode->data_dir, '-b', $oldbindir, '-B', $newbindir, '-p', $oldnode->port, - '-P', $newnode->port + '-P', $newnode->port, '-s', $socketdir, ], 'run of pg_upgrade for new instance'); ok( !-d $newnode->data_dir . "/pg_upgrade_output.d", --pFUczZf6j50rWKP1-- --2GXcf8cddNDwCbc3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmLCQ7IACgkQnvQgOdby QH0Lzw//YRbRsEYrkSPqlO0GhXofDv8QFhhJaST4nh4uiiKDIxYUViGES9Bg5W8U uoDvDIslhHU1APW0YEAAIi8bbbgd3pai11rCs6YYsGhm/Qmbd6i7P33Ege3UsP3X rHWw0lvBxRS2k/aDK9qGUv9apEqBieLvfwuM41TkrmT7hhvXDOn4XHVBDEG5IsNZ QFRuQNEfjlYgjXswQfVGpDzR54PuPeyya7JsRJrBZZPLrCF2abTkiBfej/sfAGFA G0wkhiNK+s6UcDBjIB9XCMUrW0UzIMtfd0nsjCyFe55DyrpLVeKpWesC4eXzr54O 2Fs0drNrA1xzm8nEWHMfMPIwUNVjCMuk/6XZfh4NoC0MVsz8UhmZxdRj51JQZh4Y xusth+Ap1Vo1imTVFUOEKw8CQGM1SVHad7YFoyVZu/eHPZOzzSpOcF2vwRvE0H33 FTmoGUwkYS7YfXCaidGQNzS2imERdhXJbyx625uQiuTltWbwMEpVEtmD2aMjKcfg YfJMrzMzywYm1xVkoAQ7CNjeNmP9yG7NDT1H2E73cKtuA8bolCVJ1TzAdfSzRsLc eNmPEO/5jVgdh8EbuL3TeAv/uvBse8XNLKC4vQRFCMkOBCBJn7f8qgM7F0pMWB2k zWKgB2oyEMzENKJb96wAZNPL2Fdc++46pMy99OK6AWvS83MKNj4= =vlT1 -----END PGP SIGNATURE----- --2GXcf8cddNDwCbc3--