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 1vxeWc-00H0Vh-0k for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 05:11:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxeWa-00ALeT-1P for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 05:11:56 +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 1vxeWa-00ALeL-0T for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2026 05:11:56 +0000 Received: from beige.elm.relay.mailchannels.net ([23.83.212.16]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vxeWY-00000000JgL-2JBo for pgsql-hackers@postgresql.org; Wed, 04 Mar 2026 05:11:55 +0000 X-Sender-Id: hostingeremail|x-authuser|david@pgbackrest.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 40957821D28; Wed, 04 Mar 2026 05:11:53 +0000 (UTC) Received: from fr-int-smtpout15.hostinger.io (100-105-182-162.trex-nlb.outbound.svc.cluster.local [100.105.182.162]) (Authenticated sender: hostingeremail) by relay.mailchannels.net (Postfix) with ESMTPA id 4A71E822864; Wed, 04 Mar 2026 05:11:52 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; d=mailchannels.net; s=arc-2022; cv=none; t=1772601112; b=0DUJd0rO7x4u7ZDMIP1IYnClxVQTBDvpkwMSdUhHAIsTFNJoWi8tZ7LB7/ZoovL/eaqh3V tuPQw/cXGxXWk9p5gpAZSGbnq3meLbUfP4TZZxOMlS00jugtvV5Jd4aDjBL+yzGZxmK8g3 xk/Mk4EBfBED5F6hFv5gaM6jo+9Z2lcemSy1XasuMjlFylmK5KojmNY38TCh4GAAAIoEcZ TRDqD1/Gny6/97kHMRk+xWuPWz1geFpQyYqt9jnnB0j5VswK55IH0I1kDzjtmH0X8k8CHd pI0/WgNsMRgHIzwFAG7VPSVGQUQ1we27BbpetSqLrZKfbFPIvmhd81rnGCkqkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1772601112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=O2vE9QPIvJfxromQltzacInSajevo0El7BATqjc9Y3M=; b=M5VUgU8xPowiWNMU18mkEV5CzDHe+cDE0kOLvw6FpPS+cYev2nDlxxIgmta68oNE1a7AYv zisHdBAgLQylqgHXFLqsMpuhmhqoo1DIx+KkrJGD4l3glPkynqgX7qU78JAnJafWQUI6/C U+m9+MzIIIu6a7hF0Szu1H3qowc5vglUB6grHBWtNyeQC8HDrBP2VKNfzDg6L23kdDHQNe INEEEzN8EEPxkhRpRBJvN6/c52yQtxuR82tIFs5BRghezSA5HernWF8z4bG0PORUNkFZcT jwmVX4E85X4YyOujmEPMg+hqoH3ZgrFyXaTE1UFD6z5km9KAAs1MSvWvl7GAvQ== ARC-Authentication-Results: i=1; rspamd-7f65b64645-85c4n; auth=pass smtp.auth=hostingeremail smtp.mailfrom=david@pgbackrest.org X-Sender-Id: hostingeremail|x-authuser|david@pgbackrest.org X-MC-Relay: Neutral X-MailChannels-SenderId: hostingeremail|x-authuser|david@pgbackrest.org X-MailChannels-Auth-Id: hostingeremail X-Whimsical-Whistle: 2e304855780f0fa7_1772601113154_749360232 X-MC-Loop-Signature: 1772601113154:2768243255 X-MC-Ingress-Time: 1772601113154 Received: from fr-int-smtpout15.hostinger.io (fr-int-smtpout15.hostinger.io [148.222.54.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.105.182.162 (trex/7.1.3); Wed, 04 Mar 2026 05:11:53 +0000 Received: from [10.5.0.2] (unknown [94.140.8.229]) (Authenticated sender: david@pgbackrest.org) by smtp.hostinger.com (smtp.hostinger.com) with ESMTPSA id 4fQgks01WGz20PS; Wed, 4 Mar 2026 05:11:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgbackrest.org; s=hostingermail1; t=1772601110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O2vE9QPIvJfxromQltzacInSajevo0El7BATqjc9Y3M=; b=PNJodWXAU2mVMz66RqfRAWVpzkhPXt9TJLzIpLd6DUOA/TFQJ7z2/VjYIbcfp65/tx5A3n r4iKCNNNYe3v1K2JwyqzLDK8aA2ePk8mXag0bX1Cz4AzXZubKWbl+7qWXoHG6VWHd83Dzj EKShBDUmN2ZZKtuUVb+HL/VCkCoh/Bq+iyHKQI5x69dgxmwtl71ZDXc2vlkOJ+Yc2YuLxE IWZRu95UgrJZ9D0El0H9OgSj//NlSAW0s0LswxbDfQ2O3aoPiyPtek/VOLZrzOuTjq/lQx ce8bYxdkW8n5LSyGsLoUGx1WJii6l1UVK7oD8ziDqsClCT2rp0DaV1H7pcBYSQ== Message-ID: <9e8b7ee9-4a16-477a-baa5-0cdf37a04798@pgbackrest.org> MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Improve checks for GUC recovery_target_xid To: Fujii Masao , =?UTF-8?Q?H=C3=BCseyin_Demir?= Cc: Pg Hackers References: Content-Language: en-US From: David Steele In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 4 Mar 2026 05:11:48 +0000 (UTC) X-CM-Analysis: v=2.4 cv=ZbRPNdVA c=1 sm=1 tr=0 ts=69a7bf16 a=/QbHPu0jV0zgHYS17Cm4rw==:117 a=/QbHPu0jV0zgHYS17Cm4rw==:17 a=IkcTkHD0fZMA:10 a=jixU_1hUAAAA:8 a=Cy9D2qaWfzwnHYaZL4gA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=q5YM_uMBw6irhRasv8ad:22 X-CM-Envelope: MS4xfJ+9v0nExa0BzCrH9KgHXK5972TJK7vcE8+SpSv7D9jQ7+scheb8+vEXk+JfXnthvRZDU3KfvY0eYW43tA1BTMxsjoXUrsftwrNKACIpCmvqSJk5z9EP abE7TzYsGm3V24ZC/wO6agVZqjEZvzrNNPfHaN9VIHuEyy1y+575yf0k7MneIbe4TNF2SAfu+nn9wAC0BgmYircyTQ/K7w/PA3D78Rz8vnFaccU6PRG7qNAY T55g+0WfPxc6ouAky1+RrqVs8UWdNwYKQhQ1mJ5/p0o= X-AuthUser: david@pgbackrest.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/27/26 08:12, Fujii Masao wrote: > On Fri, Feb 20, 2026 at 2:42 PM David Steele wrote: > > + GUC_check_errdetail("\"%s\" without epoch must greater than or equal to %u.", > > "must greater" shiould be "must be greater"? Fixed in v2 attached to the prior email. > "without epoch" seems not necessary to me. I guess that depends on whether or not we error if the epoch is present, see below. > + /* > + * This cast will remove the epoch, if any > + */ > + xid = (TransactionId) strtou64(*newval, &endp, 0); > > Would it be better to use strtouint32_strict() instead of strtou64()? > That would allow us to detect invalid XID values larger than 2^32 and > report an error, similar to what pg_resetwal -x does. This was my first instinct, but it causes our integration tests to fail because pg_current_xact_id() returns the xid with epoch. You can fix this by casting pg_current_xact_id()::xid but this seems like a pretty big change in usage. I'm OK with it but we'd definitely need to update the documentation to match. What do you think? Regards -David