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.96) (envelope-from ) id 1w2mEx-000awC-0r for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 08:26:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2mEv-008rFe-2w for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Mar 2026 08:26:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w2mEv-008rFV-1z for pgsql-hackers@lists.postgresql.org; Wed, 18 Mar 2026 08:26:53 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w2mEs-00000000KFc-1oz9 for pgsql-hackers@postgresql.org; Wed, 18 Mar 2026 08:26:52 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id AFB567A00BC; Wed, 18 Mar 2026 04:26:50 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 18 Mar 2026 04:26:50 -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=fm1; t=1773822410; x=1773908810; bh=SKloYXb8ll rWTkU7q+tWDbkFhecde+j+Cb5C1KBpmBg=; b=Uojt7ro9FRrsl2oMYGyoQxBkA9 ytBwG88yDYdx3LPeMUuBM/TdrqwxpfwS86U3XNptvFC8kjvnP1JaLroP5bi+jvLX l8wSov32o0DlhvyhwaR0cxqANe6rtCknAGJiDwmMnHay8PGVnN1NoSe+yTgaCBIG rpGmAzgOfa2ypll9Ya6yYCrkwI/0WM6mBe8AY0RA0b6Is8mwEHfMzChRc89+hiis Eu3ZT6W3unzgDKhufQrjFXBEtrOyO6s6bkya41EPOO9VyQHAz4YBY0p/t9xmIapR DmmLp7VqiL5c4nsaANjfEWLvfqQlk67rk+J/Bc710mfNjWikZm1kFSsHCrmw== 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=fm1; t= 1773822410; x=1773908810; bh=SKloYXb8llrWTkU7q+tWDbkFhecde+j+Cb5 C1KBpmBg=; b=zzR2G8F6haip8ki9mif+g4oGPcj6V/UiPtP3NzUt/gFjnKo5n03 8YdtEnnPB6TCgwAq4xUe6AJrGs2zxc/zRjAkm+Aj3fn1F+506WvssbmeR3QzjG63 r3Rm2e2zyu93Pi+cOu6waWyU7pDLaKAbwyg21zHouDQdeRqITPoGsRSA4gXyrjIF BjTgcfXHv7U2Ax1G8SQoLdk9abhI3lC9W/C17F6TaazXoHu4qMgs+LaXB4oqQgjh mIQGxH7aYVN4hi2cQVxzZNEwLMw64mGQSFOUWxtJ/ICthnTWnsaFrA1qVhbHS3Fi 3QNHg4APM33iTsTcA3bJZeyQmynEoC503YQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeftdefieegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggrvh hiugesphhgsggrtghkrhgvshhtrdhorhhgpdhrtghpthhtohepthhrihhsthgrnhdrhihi mhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpoh hsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdrfhhi pdhrtghpthhtoheprhhosggvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgtphhtth hopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprhgtphhtthhopehmrghsrghordhf uhhjihhisehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Mar 2026 04:26:47 -0400 (EDT) Date: Wed, 18 Mar 2026 17:26:43 +0900 From: Michael Paquier To: David Steele Cc: Haibo Yan , Pg Hackers , Heikki Linnakangas , Robert Haas , Andres Freund , Fujii Masao Subject: Re: Return pg_control from pg_backup_stop(). Message-ID: References: <8b8aa673-fcef-4e14-a05d-0885283ef1b8@pgbackrest.org> <17DC1346-0CDE-4E39-B110-3D6FB0797AC6@gmail.com> <7F7B289B-F94F-42C2-9E54-6A689C0D64BB@gmail.com> <1800c83c-264a-4183-9da5-ac78e25849a8@pgbackrest.org> <3b23e3b7-53d2-4784-b482-05cca3327acb@pgbackrest.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2HioA4FJdLDOm6KQ" Content-Disposition: inline In-Reply-To: <3b23e3b7-53d2-4784-b482-05cca3327acb@pgbackrest.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2HioA4FJdLDOm6KQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Mar 18, 2026 at 07:35:47AM +0000, David Steele wrote: > You are correct -- the copy of pg_control needs to happen before > do_pg_backup_stop(). An older version of this patch saved pg_control in > backup_state which made the prior location safe. However, I missed moving > this code when I moved pg_control out of backup_state. Code review to the > rescue. Right. I am wondering also if the final result would not be better without 0002, actually, focusing only on the "simpler" base backup case through the replication protocol, and you are making a good case in mentioning it as not absolutely mandatory for base backups that are taken through the SQL functions. One could always tweak the flag manually in the control file based on the contents taken from the data folder. That's more hairy than writing the entire file, for sure, still possible. -- Michael --2HioA4FJdLDOm6KQ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmm6YcMACgkQnvQgOdby QH2XPhAAp3Q7DOO8wYj/NcpCgqN6KDyui8ntb6DikKXEP/Oo5nVMn/YqtlpEhTox Ec1C+hNf+oIA8akJ6W22nnqbdfK1fWVWXAi+cPqhX1hLqHDsnS4+bfOhkrtsiobW FDxlgs8rlbmU9DrS3l4/HDkySrAxWRd1Gzyh0Bb+H45Vlt3zHfrRst4s5ATR5nVp DsPBndzf9hOQYIdIkN42nxUljHW0bX5g7E06ugeipSs8tXx+JCzE73SHLEo3PKRj Lc4PvwECcOMJKTTjTF2GbznncCkXL3NAxz7KrobtQtdPqTLHBO3uXnSEMHfj0RNV 5/mJew9oHaCHY3/p9v3xH25uyeh2uTuHp2wDyPNq7uVlIlSIC7qn7uXbl9PfXIHm 7857HOXSEfhwSxwn3jmHBwse36XClAuy6iFGbdfnHg+CSXVbzAB8veb1v5PD1u60 gKs5TD/KEYLaSUB72n+Lss5aMk9ceX+4yZB+Swo+g3cdkossVQXobGMyKvB0tv0p 5kbcntYiIiB7CmJJ+yBtwP/mLnCkuso7Ls4M7LgEAI4Xw8tmFJd+1h0ngdaocpo3 FVUQm794NPVBHUBrFNjM7J9+m8geY4b6CUpiCwgoVG55fAXB58iVO47WfGsRADuq /K2qsZ30+TgMmz3dPrA9Y++pxSAzmQZNbd++e241xynD3t7My08= =Gepy -----END PGP SIGNATURE----- --2HioA4FJdLDOm6KQ--