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 1vxzwB-00HKl7-2G for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 04:03:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxzw9-00FlgF-2x for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 04:03:46 +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 1vxzw9-00Flg6-20 for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 04:03:46 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vxzw8-00000000Tgw-1Fuj for pgsql-hackers@postgresql.org; Thu, 05 Mar 2026 04:03:45 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id EF1067A01D3; Wed, 4 Mar 2026 23:03:42 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 04 Mar 2026 23:03:43 -0500 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=1772683422; x=1772769822; bh=GmJOqKx1F4 zcW0zQ2MqgfXPyaR61KyxTdAsRWaSq/y4=; b=n6dT9RjDPh6Zgx5lTECf3zpDJG 3RDPA1xwLQPEvr2SLPVggnV8PJitBOmCtzvw83eKYTHBkzZa2US2gydJnSJSfkrK HB2VeKVKHcXkXkZ0A/3DIO4ibkh4jbYcQaNQ1h7DP1dR/U/w+SbwN809YnK0jLzH OFR+ffDdQLJFbrs5jRuyO3r+j8PG0AzNKyKi7b0u5/pZgb3DsV0VnTPgH/RlhcmD 14xdpeBPNq+mBS/c9/hRk9swi3iKOaS0JGwaE0fF7EO95JMJ12Hl4jE8wkwJxnZD 8rJUTvN5OQnyeOn+DqcRXSyIStYZEyDKgcD+4xm2QIzAMZCi5kwXwiWVHxSw== 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= 1772683422; x=1772769822; bh=GmJOqKx1F4zcW0zQ2MqgfXPyaR61KyxTdAs RWaSq/y4=; b=nWYauRHWFS5TQgS3yv92GFh/l5mpnJffaHmllAGcle+JicPNOsW HRsXRj004I4dAEoKtHKrrw4evEZjT4acRf2RsHIhqPOzXpaQsox75r+xuEk0HG3p GSy18x+KOwWB4POEQFv8Gve10XXdoxvZVJXztpPeOmvlJiY2qkjRrtNJDhQ14ydJ O06raRMqYgBBWu9HZoVCRMBXGvunYm9aSvN00qfetFBFrmWlu5+y+fIFZPS5iAoJ uwws/pI9wLFe5Z9lSxm6DVmcfsdEjExTrfWziO+K0m8zxl7lEhu4gIEDKIeaVOYU xTnS5yJJlNIA/GW3he8vxqjuhps3GOVvvXQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvieehfeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepuggrvh hiugesphhgsggrtghkrhgvshhtrdhorhhgpdhrtghpthhtohepmhgrshgrohdrfhhujhhi ihesghhmrghilhdrtghomhdprhgtphhtthhopehhuhhsvgihihhnrdgufehrsehgmhgrih hlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghs qhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Mar 2026 23:03:40 -0500 (EST) Date: Thu, 5 Mar 2026 13:03:36 +0900 From: Michael Paquier To: David Steele Cc: Fujii Masao , =?iso-8859-1?Q?H=FCseyin?= Demir , Pg Hackers Subject: Re: Improve checks for GUC recovery_target_xid Message-ID: References: <9e8b7ee9-4a16-477a-baa5-0cdf37a04798@pgbackrest.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BTmk514iskls48GL" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --BTmk514iskls48GL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Mar 05, 2026 at 03:40:44AM +0000, David Steele wrote: > I wrote the tests for recovery_target_timeline but I was not too satisfied > with them because starting Postgres is fairly expensive. +# Invalid recovery_target_xid tests +$node_standby = PostgreSQL::Test::Cluster->new('standby_10'); +$node_standby->init_from_backup($node_primary, 'my_backup', + has_restoring => 1); +$node_standby->start; + +my ($result, $stdout, $stderr) = $node_primary->psql('postgres', + "ALTER SYSTEM SET recovery_target_xid TO 'bogus'"); +like( + $stderr, + qr/is not a valid number/, + "invalid recovery_target_xid (bogus value)"); Smart move to rely on ALTER SYSTEM to check how the GUC callback is reacting on incorrect input values. Why do you need to create and start a new standby if it is not used, then? -- Michael --BTmk514iskls48GL Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmmpAJgACgkQnvQgOdby QH1SOg/9FgdBxMFkiYasQNgAKqkqHOjuvZYsKm0EQfzJL0ZIgPGjZZvA5N/nNACu 3MebxXniBuguNDrBSqHwp+OC9QRR2w/PdHaMwVHAJv+AE2CjgdMFrlxmoyHdIx9p nTQmP7usY7v/xGJTTrvYmLsEuY7sekkVP3R6oM8fyCW+QChmEwU3hEiP+0qcPZTL WIC7C78JxgHh7LUdqv6mXDR/8+IRQPOjpE5iwXheyzpudbnkaJ8pdYo4ZjrSl59R LASagHIHq+0C0scYZMRNhS7BOYl0JKH1A+QJPllKFMGqe2Qeu7Y31CKRQHK0bsBj v8uWjUFsTciNoekruDPi7eg+oQ+hP4V1f4Xs7vHFtKXygmDjfgBYu4dBxh6ooMVd ld/nNQnKB6gXuy/219mSD7rIKAVvs3WA70u/8NH1sIBPq4DLH7r+8uOY/7OUv6Xl A2ykmvoVsGDq78Syj9U/MV1/tyRrkvREIyUNk9ooNECh/cI9fOGUDuvJnWguiMmS Ml1HGNe1IajF/XZmIhA6E7y4BMVmn11Dreaj3EmkKYsAVSkeOYW7oBDwSwsY5hXD cjzHv9Uiat+sOJVFZ7hTlkL1+gV7Z/GwpvEjLSxozKM3DDuvLvP1aAWFlYVAjPEf CZE98spBxs+UiVEA+pSDrXy/jF+ms53cwmZSwbPwQBwa6/unGoE= =Fpjx -----END PGP SIGNATURE----- --BTmk514iskls48GL--