| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | David Steele <david(at)pgbackrest(dot)org> |
| Cc: | Hüseyin Demir <huseyin(dot)d3r(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Improve checks for GUC recovery_target_xid |
| Date: | 2026-03-04 16:19:17 |
| Message-ID: | CAHGQGwFpq5D6z+NcPhZuSazkX_PjMFE3UNKwnypNs4FRT7brDw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Mar 5, 2026 at 12:41 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> My earlier comment was based on my misunderstanding. I thought that only
> 32-bit transaction IDs were allowed for recovery_target_xid, and therefore
> values larger than 2^32 should be rejected.
>
> However, recovery_target_xid currently accepts both 32-bit XIDs and 64-bit
> full transaction IDs (epoch + 32-bit XID). When a 64-bit value is specified,
> 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,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-03-04 16:20:45 | Re: pg_plan_advice |
| Previous Message | Melanie Plageman | 2026-03-04 16:01:47 | Re: Correcting freeze conflict horizon calculation |