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.94.2) (envelope-from ) id 1rsB3y-005Ks6-7d for pgsql-general@arkaria.postgresql.org; Thu, 04 Apr 2024 00:34:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rsB3w-00BTKS-Ll for pgsql-general@arkaria.postgresql.org; Thu, 04 Apr 2024 00:34:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsB3u-00BTKK-Qi for pgsql-general@lists.postgresql.org; Thu, 04 Apr 2024 00:34:40 +0000 Received: from fhigh3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rsB3q-000VmC-J9 for pgsql-general@lists.postgresql.org; Thu, 04 Apr 2024 00:34:38 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 5550E11400D1; Wed, 3 Apr 2024 20:34:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 03 Apr 2024 20:34:32 -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=1712190872; x=1712277272; bh=5hhuCKxOLD d5fw3FEq4hnAOCP6RfvNuIkpKf/D5b2Os=; b=JGOFAqQhIb0e1Ddi06iRnh+MAb o6JAAnGL9oMMDF5OEOuD7ds54zg18ElNfOXKl3Ox0nwMEgDgRSTfK5IjThANiWlF 0yz0NLIAO3WYG9/a5d9pCZlsdS55U4jKAIgOVGjWPPiXcAQPcOGV/8IBP/kB+iyO 1/LEO9CHNHWBVVwNsvyhfsB1moVRdgxWt9j7Y6D0UX0FGqlQsuFK9Pr6hfnouhEH ZWSTYrz+QDrHsHbKHFTyBRkLNn0L/zW3B7pgEcR1P8/VYIZfEVt/HiTUPZLfQPSZ 8cjV1DqEk9Y4HBT4kURxuyllaqhHblfo2lRvpeJjdfdWXWWLU/4zfuvwe6bg== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712190872; x=1712277272; bh=5hhuCKxOLDd5fw3FEq4hnAOCP6Rf vNuIkpKf/D5b2Os=; b=lBkTsN1FXGwBgHuCbpEwIROhEej/DK7Gz3rUhEPEWqsd uXw1JjQM5+yPJHsHKhYggPuzKfgiVJ/1WSOq3CBebwaO42JWTKPEU0krvkYE+BXf R7SHYd/jrFZ3wwzb0F1u3y8RYHpaU+44fQsIcGSQV13xiwXaokFXI35iU5DQPdSv NOKIvscdcEU1yFVVk8j0+lRE6bkfVyMtWPqjUXdTGMLhThF41HK4SeTQBzq+Frwn KSLoT1IFpl/RjsTSYneOX2xb0DqNrhn0I2Kh2GLt9rhQh/xXC7ev00O5nXYXI9BD 97b8nn3cWdsLMccRxTnTLbUJEaIoM0xwy3gJsD/y6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefjedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 3 Apr 2024 20:34:31 -0400 (EDT) Date: Thu, 4 Apr 2024 09:34:19 +0900 From: Michael Paquier To: Isaac Morland Cc: "pgsql-general@lists.postgresql.org" Subject: Re: recovery.signal not being removed when recovery complete Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GSZTtPxEvGG4GznN" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --GSZTtPxEvGG4GznN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 26, 2024 at 06:22:32PM -0400, Isaac Morland wrote: > I use a script to restore a backup to create a testing copy of the > database. I set the following in postgresql.auto.conf: >=20 > recovery_target =3D 'immediate' > recovery_target_action =3D 'promote' Why not, after a pg_basebackup -R I assume. Would you mind sharing your commands? > In the logs I get "recovery stopping after reaching consistency" then a > moment later "database system is ready to accept read-only connections", > then some entries about restoring log files, then "database system is rea= dy > to accept connections". If you have some logs, that could help as well. > I am able to make changes (e.g. CREATE TABLE), yet recovery.signal is sti= ll > present. My understanding is that recovery.signal should be removed when > recovery is finished (i.e., more or less when "database system is ready to > accept connections" is logged?), unless recovery_target_action is set to > 'shutdown'. >=20 > Any ideas? Even just confirming/denying I understand the above correctly > would help. Not removing the two .signal files when promotion is achieved would be a problem to me because we'd reenter recovery again at a follow-up startup. ArchiveRecoveryRequested should be set if there was either recovery.signal or standby.signal found at startup, meaning that we should have a TLI jump at promotion with a physical removal of both files and a LOG for a "selected new timeline ID". -- Michael --GSZTtPxEvGG4GznN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmYN9YsACgkQnvQgOdby QH3y5Q/+I5/pZUmAlAEmVNE3zHTztH1d5etNaqjjf6MCWZPXp5+XtYvLrygBcYK4 thrn5Kvs2D+5+wQstvt2ldzhkzo1U1hBjuFim6CfbPydH1HgAVI68901EfrbM+Q7 wp9iKmpBYTuamqUsGrC77Xd+M9tLYqQlCCZTlw0VYgTDV2I9hDPJ5109aPBWlSdL QY3eVaTUXtDVTb6CHZkx2+rGTpFeICuQoL/Br2g8DkZVm5q5Vg15/4QDNKQaLwZ/ 0rfI0uBIlIeaxmL6NcEVlZY76axo8HOAKMf5CIFydVe6brqcVixY9ww+8qq4Qb2i j2mz0c8fueeTwv9Z05VXEOs67/B9tqh0s90n3fSyx2bN8rDcuPsZzrfjdMQj00uG D+w4Qx+KuPOanNccV/YDmp8qiIYO7xpBl7igprtpwNI2lFIcnDTD6+P31o6EHppU GerofbI+tI3LVHFLwIwqQG6Nx2FHIaB6SpNDPyo5zmoWWggfONF+YBMtPSSEdYPq gWfOiU4zHaWgLvmW9FBrG0J2T2Q6pDyFGSHwg1n5rL3VDyiY9mvzHduXfIXPGJFJ tveYwDFaStJtQM6KtdPsNoQ85S6asvlGCsr66ZFmouRdVNHBmx5H7H54N6eYqVuD XUt05mjCw0HoOfyJR0gF1qDCmFiDwvt2ny/SsIe23t/qXVKKvWQ= =/AZL -----END PGP SIGNATURE----- --GSZTtPxEvGG4GznN--