Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMZEN-000000025de-1ACd for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Oct 2026 23:08:23 +0000 Received: from localhost ([127.0.0.1]:56178 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xMZEM-00000006gbz-1uV1 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Oct 2026 23:08:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]:47350) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMZEM-00000006gbr-0AzU for pgsql-hackers@lists.postgresql.org; Thu, 29 Oct 2026 23:08:22 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xMZEK-00000001bLs-0aW2 for pgsql-hackers@postgresql.org; Thu, 29 Oct 2026 23:08:21 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 5CA381D0011A for ; Thu, 29 Oct 2026 19:08:19 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Thu, 29 Oct 2026 19:08:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1793315299; x=1793401699; bh=XzIdxj5x9/ 7lM42/LkvB3x5RTHyTWzRIpnxEEgmBS24=; b=P/SyJKW2H/i7Lo6k/Co+EQ3wHd nag2Ejejm/V0RMjv9A4NI1SJ2HvofSwFOhPFHHytWo6CHe2DtgKFYUrb2rKU1sG2 On0g6EMYNFa/xNMbwmvMBmCstPmbl3NZ24uJ3wSeT3tWqKC5DsSryrWXCd4eF+EW WcJhp9WYkgcZg8PFF9ZvxBiq/3VinI+5wAZ5qbjwk/1wtE39n5SAgg+RTMvCoOkw fxRzgPAPllC5ENbnKJuEcQnrylfJE0iGUCiQxqfZH6r0EeR4M85b/zmdAwFFpRqG HKzcSHQWAbmwOZf2rynYRajKrso+ej8tUyR2p98ytgKJiqguGS/u1r9GhLUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1793315299; x=1793401699; bh=XzIdxj5x9/7lM42/LkvB3x5RTHyTWzRIpnx EEgmBS24=; b=e/61Guiouo5KWNeWQlQoQbpa4Wd0eBIS0gN/vvDsBEsbODUabwD dLuzSUVTFwkUtOC6+rnyTUQ2e0Fp44ugo2I8hxR1fUJeL4w6l4F0kN1riHkmBAae VlHKYU4KEonmS4P0PkJi9uaWq8tI7YcO/TWJg93FypS6EP/2ai13Qd29KVAjbB07 qFDInuziUxFAotWpD2lURiLgV1I7lbVsEYqj0R8fJVzxsv8ox52NDxLsmPEf4SBD a33MxKF8UFPkre6SvppEEWALI5OM++cQHE+RkWjx5BYdC5vtnN5EnjlvmI+bjkdb ja5zFyNBX1RmUzMhNdpmBeHcAeEq0iuo4DQ== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-08; repo=github.com/dkim2wg/interop; date=2026-10-28; sw=lmtpprox; action=sign d=paquier.xyz a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1793315299; d=paquier.xyz; mf=PG1pY2hhZWxAcGFxdWllci54eXo+; rt=PHBnc3FsLWhhY2tlcnNAcG9zdGdyZXNxbC5vcmc+; s=fm2:rsa-sha256:Df1Q0Sbk2vF03DH4Ck2Yf4Gbpu42hDelhAvp1VqlgyCDAQk gCsNKos21V51pq20q+oFDaH0OuYHFSRUE0k97ducjSlFeqB/xM+pD58zd9WaGeew ZXuIDPicVhNI6+Q5w8rlz0H4w4vjfg0exJ2DcuoakOSpa7mfN6/PoJnWklGbOmFj sFtKbJ8T43lIyXpMeB95RAVuAFC/1aersgMiRYo8zIf/+ds0Qilx6xwdeGMV0gJR 1o/cYXfhlTqjGFCRzu86nxv/ANVCeuMdgEx8FSfzjQkJyw89g++OtCWIkdOd1jy0 SeaMRXk1eclQIFySUVqvtV+N/ClKzQLm8WccOyA==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-08; repo=github.com/dkim2wg/interop; date=2026-10-28; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:yF4XPzyuGvIHN/vsoM/fuW78uXv1axuKt5XYrCF1m/g=:8Ih18QvmS0+u1wC4jWLUtyC6IWSm72dlBjyj2TXVOC0=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGXhVCT4wN/8WTQL6Jw/aNkRw4g0adiiRGavPYFUhH8sq50K2eWaPGLv0TVC7I73j JLNWSSIYHy/+2+2sYyqd2YE/cVEfRFIGXLiFQXn+wQ0Fyk0WsDxfDkyZOxXtwPsVH0g19x FIC/tok1v+PjMr6BEHkllb5Gw2Nioq+3ZMYpwY+dv8/9n2bilDX96XZN1TfBPQiUiJwhsR kco8SfbX/wrNspi2TomcNAgFnPv/iG14BEC4TqimBJ+YraqzK6wjp30uRNCfCj4FQPGaoZ cy9TQAYR8vsTOh/sguq6Q0zWkwsHHcQKkUioR/v7/gUhFGT3nW8Q8ryQgzUwHawoe4x0bw yQZ6P9VJpTopFiPgAhuMwlm33cgmsexkYChJ1gT04LQ4VfzrUzGGbssz/dNTMG5ACAe8kn gig7XxYPiww3rlcZhDa1GdDNK5ACN9fgQDQa50Le8hO3MyS4Z4HVqE8Hmcjhx6vgGQRZht aktgxggaNVn43nKGsfmc0ho1LKxaGvqFElpotX960YvM4E1wSA02v7a+jehaVnYdsPw924 ZDvFqQoZcdLE/NgeMH5reQz+tgyJaZuPnrBL2tV3vwis7pBFQxRv66t7fmvm5CpvelHzU5 fWf5LfFkoiikbv/VhqP1jZ7yvkhYs17syd3hMqenq2FrVeTzqKyivKnRcCbg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Oct 2026 19:08:15 -0400 (EDT) Date: Fri, 30 Oct 2026 08:08:12 +0900 From: Michael Paquier To: "Burd, Greg" Cc: "pgsql-hackers@postgresql.org" , "hlinnaka@iki.fi" , "david@pgbackrest.org" , "robertmhaas@gmail.com" , "andres@anarazel.de" , "masao.fujii@gmail.com" , "solai.cdac@gmail.com" Subject: Re: Return pg_control from pg_backup_stop(). Message-ID: References: <0CF8D09E-24E4-4E6D-B069-2103D3BDB4E3@amazon.com> <010101a188dc4581-778a3946-ee8f-43a8-8c30-63349d9aabe3-000000@us-west-2.amazonses.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SQjnymQFAp3S0PGE" Content-Disposition: inline In-Reply-To: <010101a188dc4581-778a3946-ee8f-43a8-8c30-63349d9aabe3-000000@us-west-2.amazonses.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --SQjnymQFAp3S0PGE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 29, 2026 at 06:11:39PM +0000, Burd, Greg wrote: > Validation of c97931c16d on the same machine: with it applied, three > runs each of both reproductions give the WARNING and ERROR and no > crash, and t/010_pg_basebackup.pl passes all 168 tests with no > backend crash in the server logs. With it reverted, the same TAP run > logs the SIGSEGV. The test still reports PASS in that case because > it only checks that pg_basebackup fails. Ah, thanks for the in-depth investigation. So the previous guess was really right. Candles work. > I don't see a better fix on our side. A helper function with > the array would also work, but palloc0() is simpler, and both rely on > the same thing: no PG_TRY() frame larger than 4kB. In a core build > on this machine, the only other function with a frame that large that > calls sigsetjmp() is be_lo_export() (char buf[BUFSIZE]). Its code > after sigsetjmp() reloads the constant, so it is fine today, but only > by luck of register allocation. I haven't checked contrib or other > GCC versions or as mentioned earlier against their bug system. Ugh. Even if the buffer itself is not used within the try/catch block itself? Getting entirely rid of the TRY/CATCH would lead to a much nicer result overall: we'd be able to keep the local buffer. Or perhaps go to the simpler solution of a palloc/pfree? I cannot believe that this extra allocation would matter for lo_export() calls. If you are proved to be right, it sounds to me that we ought to fix and backpatch that as well, especially if there is nothing we can do on the Postgres side. I don't believe in luck and magic when it comes to software programming. Thoughts? -- Michael --SQjnymQFAp3S0PGE Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmrj0dwACgkQnvQgOdby QH0hSA/+Ie9C+fMvFQAygYPjTxHrWEqPYGIw0GpFbjVbZ48eAKmlygKhN2zr3sjK pLe/9NvlFNiC+daUwjigdC7WRDSZTEvRJW3mfR6RKd+gV/gl45tfiQs9UL9BTZzO Y8psZynt9w2P/xNURM0gHNIKnDaMn3Pg/ZCE02lM1wjRJEdXE9/0pJ31zDSgmFVJ NWEgb3slsONNTmn6jp4DZV2HYlmfIQornBhIsm3s4/YVQqsueR179tIztukSiHSM 0Ww7IGjULosqGrrnhgzAvd8lZh/KADe9r/SMQxJlY8naXbwXTPzDEZtFovu+8KH2 mZF7yEOTuk3XPUBQGzApeglzZnt+U46E6q48iXFd3pvJpMHfX7VWQIpzjpvvC9WF iIlBmEmJxEfpnk5wy/KQ6xD1jBIHxGe4NjzSKiS/Lut1R0/zDAv8QnTJXgSLr3N7 MhSqZ4HTGkZuYgnobUfLFEVGigZm+3+3vLzz3Sahxu+zj5078Wm+8AFtOEYq4YWM ncqGY9E8CZgLZvnTI/bjGwRZqCRWEtkN4pwydUQCsx6IKc4AZYyKWV0Eb/4Fehhv v8brT5Vj8ogKgqItQUL6A7PF4Rqv9KJWo7OdZYtTJ5vbEtv1WeZROPaukwGQ/upP OhOrxABkRmWsx3RUFiEKhuNugtrQRnDb2P2oVq9H/mL+iZDqkhY= =jsUt -----END PGP SIGNATURE----- --SQjnymQFAp3S0PGE--