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 1vxowi-00HAX6-1m for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 16:19:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxowg-00DbNJ-0H for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 16:19:34 +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.96) (envelope-from ) id 1vxowf-00DbNA-2d for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2026 16:19:34 +0000 Received: from mail-oo1-xc32.google.com ([2607:f8b0:4864:20::c32]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vxowe-00000000Yrs-0Nv1 for pgsql-hackers@postgresql.org; Wed, 04 Mar 2026 16:19:34 +0000 Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-679aebf4e56so4776706eaf.3 for ; Wed, 04 Mar 2026 08:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772641170; cv=none; d=google.com; s=arc-20240605; b=aqVXnnXcohkt4EQURSr+N+3XY90pdK7BXzImjI9dxs6BS7K5AdMuUW6xhVD1oFbhbM imkz9Lk4kGt+Ur0WNGI2BgAnZyae2Dn0C8dEmCrZVTu/cVUQtDI2IrOylY3OzW/XaviS /D1dO65F/UX4HiE1Lxf8wguYaVowVWKCd+6vqym0rUkprVZMq5xgpaRdIJ/r9ml9Nu8d OIzTuerd11JWia34CIj6p8JmU1vNE3FgSnasNVR1FB6/xhEZvp21HiHGd3luYYaI1PUL NRflmDgdH36kCyajLpXzPFLVsau/1fEO40r67Asu68VE4bR7LFaWgogiV+Cko/dg0r0Z GSwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=156HiRhHTku+/ehfh5nUqOkW0a9bhSLX7c0fuhLRGfw=; fh=JsObTYHZvZn1GeSmRNKt9KtNYK8igQT3F48W8AisrPQ=; b=GOYOSIuljrMscGhIkV9M2+v4YetfxMIkOTSCo+UNQugmPqmI8mjyKR5NM2o6oq8Thl Rq9tT7l/fq71oiMxo3Y1o6LCT5dWnRRRJSyYAOrJjSzBYtQlmKr49tAc/qt4PRbov9vt e17tFDhFbeaAVQ4N5vTurQn8rj7xPmZTXbdX2RNCsgC/O9sGJ1Ijdd4CjT7bJ1GeL7xu kMjZFpIAM7gVEA1m4eYdvU+RlNK3giczvmPsGmPlf9yR2E8eUfnWPcMq3Fj9P+8AKyih SHPfoB2SZQ6HXWqjSyAoer5qXny5tqlADd7KqtM59iI1EWKhLKsBHN1lhxZuLnZTUc0Z QMWg==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772641170; x=1773245970; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=156HiRhHTku+/ehfh5nUqOkW0a9bhSLX7c0fuhLRGfw=; b=bLYA4gTUHao537S1B+gYg8Q6y0xS8HAy7WH3InFNIRJw3PjM0m8azpGfHs/or04Hzb kAcYm8Zm2FQfQmW1gJSEIWvlKI5NinUGoN2Fw+kkKC5BVPXbwPF1mgjSR31iqpITMzCF QGwPbp+qnIc1dxCEkooYsSKmPTU3CJWfv3y+a5+IealXTTbBZYKrKvZSfptP02ImfWZT OWb43uX5laviGqNKlxIyteqr34RJ1VDcC8CRX/E6O57u/lLiqc5fXY6yY1DibfD0R+jB cIxdhjkTGTVKgoR6DjqtgWJ9z5rLMxD2dWI+AGu9MRWd4kQ8IHjr6A1SeryMhydk/aaD vwXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772641170; x=1773245970; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=156HiRhHTku+/ehfh5nUqOkW0a9bhSLX7c0fuhLRGfw=; b=p6J6G5Q+nD6ezqhfPEYJqGKFKMBPIuqyZFKSU6LuhXZaiQ7u/0jqKmLeGRPWotDAXD UWnm1RMZDr7FMmaJBYNiZGu9xrmQj7RvzJ+vXVlCzuHqQ94ocoWl8yHpg+0HaGXs2rfx aC78wtsbMiVfYTjMk+HGk867c7XDK2Wg2qiFjS1zpD/ByiGW+gwzOvVC/ENY29DmLyNj 6NcVqz1EgXdbiOB+sUcuZ2xBnt8fWYvFzEad8nhwIa2WN9ZCJnCZtzJ8SBNO0jw9q7/E NzwmnRUbeE4wnQWa7zxxJdmhfOk3fS7pMvNaQK0Epz6aq/tHcPp8+BtGA5NR09d8IcWs LeQQ== X-Forwarded-Encrypted: i=1; AJvYcCVyl9pCy9lhYmTNAsm0VSy02NFcP1mMm6eabdtjwWsw3/Hap3jdMDPQNb6ocm60fq633w4oe1KSCjEcDIgb@postgresql.org X-Gm-Message-State: AOJu0Ywktm4Wu+d4GhBYZ7uxbE3wHqbhTch0hETOIY5cJZ9mHkuhzP5z 8sMNiwydXTr4ahhYKHnr/ewC0xfLCVXeVQI0Fnd7e8gZITO8HRWPj9Wkhpo7jB4mfqw0+rpKI0U wkHOZPaEPuUHKp7dpcJbZc5TZV4TKw0ZIpmWQlwY= X-Gm-Gg: ATEYQzw+gHOJZpheb1vtyzThxSYHgTQcHX84/t86M5aZmmsMGSd8AUDjQiAvp6g861j fw+c+xpYwsE7IbBdJLh5mTlevf4GN5MbogN6X+I61lJ8SIRqm+n7ptxugTz37B3qatG9LTz1BKy dSPcc5pN274lSQEI5Z6OHdU807OFRASD794lMcL7VCr0krh9ofZP+DHYfMh/5lhZ1cF5C3D9eGp BXhGusmJKMLXvvUH0x+Bw+KFaJgdv1psqww/R9hBz8v/95c5Ou52Pr7Eg0ncVxLWawo4lkqF2Yo lLGa2OtkG8ytBnvd6Zgf4YxdRFch00TDwdY3ElPUXg== X-Received: by 2002:a05:6820:150f:b0:67a:1bd8:9e7 with SMTP id 006d021491bc7-67b17754b75mr1470768eaf.46.1772641170265; Wed, 04 Mar 2026 08:19:30 -0800 (PST) MIME-Version: 1.0 References: <9e8b7ee9-4a16-477a-baa5-0cdf37a04798@pgbackrest.org> In-Reply-To: From: Fujii Masao Date: Thu, 5 Mar 2026 01:19:17 +0900 X-Gm-Features: AaiRm53IBybR_wUAC8QKldlT652VPDtyjoBykV0Y0tuw4Pqr9xsbhsv5JkULS4E Message-ID: Subject: Re: Improve checks for GUC recovery_target_xid To: David Steele Cc: =?UTF-8?Q?H=C3=BCseyin_Demir?= , Pg Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 5, 2026 at 12:41=E2=80=AFAM Fujii Masao = wrote: > My earlier comment was based on my misunderstanding. I thought that only > 32-bit transaction IDs were allowed for recovery_target_xid, and therefor= e > values larger than 2^32 should be rejected. > > However, recovery_target_xid currently accepts both 32-bit XIDs and 64-bi= t > full transaction IDs (epoch + 32-bit XID). When a 64-bit value is specifi= ed, > only the 32-bit XID portion is used as the recovery target. > Given this behavior, your change seems to make sense. I'm tempted to clarify this behavior by adding something like the following text to the description of recovery_target_xid in config.sgml...: ------------------------------- The value can be specified as either a 32-bit transaction ID or a 64-bit transaction ID (consisting of an epoch and a 32-bit ID), such as the value returned by pg_current_xact_id(). When a 64-bit transaction ID is provided, only its 32-bit transaction ID portion is used as the recovery target. For example, the values 4294968296 (epoch 1) and 8589935592 (epoch 2) both refer to the same 32-bit transaction ID, 1000. The effective transaction ID (the 32-bit portion) must be greater than or equal to 3. ------------------------------- Regards, --=20 Fujii Masao