| From: | solai v <solai(dot)cdac(at)gmail(dot)com> |
|---|---|
| To: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
| Cc: | lin teletele <teletele(dot)lin(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Use pg_current_xact_id() instead of deprecated txid_current() |
| Date: | 2026-06-09 11:00:21 |
| Message-ID: | CAF0whucbDX-vxcUnW_XE0orinfopVnRiFRvDD9h9tYTOVwV8Bg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
On Tue, Jun 9, 2026 at 3:01 PM Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> wrote:
>
> On Tue, Jun 2, 2026 at 4:14 PM lin teletele <teletele(dot)lin(at)gmail(dot)com> wrote:
> >
> > Hi Shinya,
> >
> > Thanks for the updated v5. Looked at v5 — the arithmetic is correct,
> > and the tests cover the edges.
>
> Thanks for the review!
>
> > One nit: in-development patches usually pick OIDs in the 8000-9999
> > range per bki.sgml, but it's not a big deal — the committer renumbers
> > OIDs anyway.
>
> I didn't know that, so I've fixed in v6.
>
I have reviewed the patches and tested the newly added xid8 arithmetic
operators along with the changes replacing txid_current() with
pg_current_xact_id() and have successfully verified the following
cases like Basic addition and subtraction using xid8 and int8, Reverse
addition (int8 + xid8) behavior, Arithmetic with zero and negative
values, xid8 - xid8 operations for normal cases, Boundary conditions
involving INT64_MAX and INT64_MIN, Overflow and underflow handling for
xid8 arithmetic, Maximum and minimum supported xid8 values, Type
mismatch cases with unsupported operand types and Commutative behavior
of the newly added addition operators. I also verified the INT64_MIN
boundary case discussed in the thread using a valid bigint literal
representation, and the arithmetic behaved as expected. Cases where
the result exceeded the bigint range correctly reported as "bigint out
of range", while xid8 overflow and underflow conditions correctly
produced "xid8 out of range errors". Based on my testing, the new
arithmetic operators are functioning as expected, the boundary cases
are handled correctly, and I did not observe any functional issues
with the patch. The patch looks good to me too.
Regards,
Solai
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2026-06-09 11:01:28 | Re: t/035_standby_logical_decoding.pl might fail on attempt to read wrong timeline |
| Previous Message | Tomas Vondra | 2026-06-09 10:43:04 | Re: Subquery pull-up increases jointree search space |