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 1vpQ3P-007yW9-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Feb 2026 12:07: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 1vpQ3N-00AQam-0b for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Feb 2026 12:07:45 +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 1vpQ3M-00AQad-2b for pgsql-hackers@lists.postgresql.org; Mon, 09 Feb 2026 12:07:44 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vpQ3K-00000001oNc-1r3h for pgsql-hackers@lists.postgresql.org; Mon, 09 Feb 2026 12:07:44 +0000 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-5036d7d14easo36857711cf.1 for ; Mon, 09 Feb 2026 04:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770638860; cv=none; d=google.com; s=arc-20240605; b=ksIFjYwn2fPLv87ThhbUFxKChaCNZpZmdTNRvGffbPbYNpXnRVmljSOj1KyviF35RS 9glJznK4125Ic/SVY97GIlZ9/xOizXa88GnyJKq+MfmBrIrkJ4+faJ3+Q0LpapLlyqke 5L3p8GglH4a+MQcjZtmnx1NAZwWUWYMZPTVUt2LDzTj5dcnmvDOPXLdgTfmXBZxHKqLD 27nLANLH0//rgrNgfiHOnegjLOYkb1mx9gfnwpjjFacjJm9irtfYIHgk8PVipkk2vlpX 6DFrzc+ReTu4k40PniRMHTYK0vTUh0kF47kHBZyYyu/kaWW253ylqC8wGYXNkkYHod9p +Qpg== 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=RkFKXW5gKECcAPuAgSQqPOf/1nI+Pp1FKLXJnCI5hC0=; fh=/6e3aSrRGZVPC0Iqvx5jRTVvKNd1vqrtkmKJDqc5V5Q=; b=KVMZKIZRTfzkTdHfSA5JibFQ5wdaYhd+uz+9pATkF3zuKFMLQoG3bRkYSVsvlFykA5 u6SKg2pWprsoHN27wmncvbJGcEC0ftlwOF29kjnHYfAcd/EZKNgtNvPKsnsFCArxGqdM Ru1R+/yv+l67oUHvAD6Y8xbc9X8xP/0iitywQIOZhawTv42FolqXax3DLrr6QrDgqr/p u7q6pQUh1NonZEY8tZrQuH/abHvoJhXyeyQU0uTUbnvQwgb0VRUcZSvln55rdxbCr39q kMV0na+0EFwv46AVlQoHxyc8zkrZqEGaQrs2DjSxSYlfO3bSg4zS+TyItSEOzsJ5VRgQ R13w==; darn=lists.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=1770638860; x=1771243660; darn=lists.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=RkFKXW5gKECcAPuAgSQqPOf/1nI+Pp1FKLXJnCI5hC0=; b=ZPeB170AiKjgkCcYfQeNrhDgzZ8xiQOewJ2cKE2t2KmWO6qdpq5iqekXrnWTUbp/ph oibYycgT5jHnbbal4cuSdq7NSNIOxIAtrd6oCcBR/9TxdxvFTy9b/MdZWbCIq8504Mki Jd3euotZJWX/TpshlEl/KRLQ33JClNEkv5XFZfvjrXQy5kzgxnMGX55dtoLCOqd1FELv kU6WrYBsotycya9liq12dAENu9I8omYAbugEyI90NtMLfHhnBOPnsQVN3zpRirYsSMy2 ixwlXgDY9UKRWpGljvptOL2PNVVAgWSJDwLs/sVrAPhGtPzwPTGd3CSVyrr+gDHwbgpQ QXfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770638860; x=1771243660; 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=RkFKXW5gKECcAPuAgSQqPOf/1nI+Pp1FKLXJnCI5hC0=; b=fOWs98cPymRybYLfuYU3k74lKQTQN6/Q2aqipUGWpRiFZT6mjRGKKNBs3uqRuRYo0q nKCZqwb24mx1X/PqUpf01agtnaPO47wP6BVh4B7NVIWYTOB3Rg5BY3Ta8DpcGiM8lxaH 8kCbCwzquhaLdBQBmiU7M3apNCo6RaXyi+0R5DyCaXdYTkM0u2C++NewAhLbJ4RCfieS X0McLZ1Nwj0HgvNNfqiGa6UiRBZuQ6VJfCWPQGnKAWjxzj9bZ10NtgwzbZzzfPo5oWjF Rjfji0gA3aFxDHDW42QANU2MiKhGBdjgncgt8F3Eq/IFl+ePljXM27217fjHmAqatKen wlew== X-Forwarded-Encrypted: i=1; AJvYcCUk4o37KVGTLqvQpNyZ8fRc8Zdu8CJhrJnuCypIavpkeJi3jf030Xa+lSK0ABEFkquTGI+DX7+b9q8SjMYw@lists.postgresql.org X-Gm-Message-State: AOJu0YzcSky/+pz7RFwiFOkG2yB5y3kVBNde0XorafLXkaPwzPbNRzk7 WqIqhI9pc8bHVLRhMymDj6efHMbfhX0nj/x+1H9rN1RUMGsRod2I15YE19uDlXEJrXdJyCxdUqj ymSxxnzQOSM4zXe1D6ionYmJy3CfvHw== X-Gm-Gg: AZuq6aLGrEtmrfADtBTF5GaoWE84wHPR8DjOSBr5/O0CVQ/9C8zJv/UNg1JAiNzVjA3 xEEydSnRZS+1uA18xyICYafjRr2IYF4/1MjFnxDX7tjPOS03jC9VG1tq7YNmMMegQFNAJ7zLiVB 97NlLz33r+i/qek9FHOKj0cPvYXUBGiOBpi73A2v0kyXHpl/sQgmWROUIumSmDRUOeWgJuoY8JD zmIn9oTzQaIDEZXk3AG9VMXuYpg/XT9Ff8YOBqbav/6ymyfRIaU1vifS8z5wdwsHeyLdpY= X-Received: by 2002:a05:622a:50a:b0:4ee:28b8:f110 with SMTP id d75a77b69052e-506398a2773mr141608491cf.29.1770638859559; Mon, 09 Feb 2026 04:07:39 -0800 (PST) MIME-Version: 1.0 References: <9697ad60-ec88-4446-89c1-dc02a3b8e89c@app.fastmail.com> <2645118.1770567884@sss.pgh.pa.us> In-Reply-To: <2645118.1770567884@sss.pgh.pa.us> From: Shinya Kato Date: Mon, 9 Feb 2026 21:07:03 +0900 X-Gm-Features: AZwV_QjM6V8O7M10xMHu7XCU2TldZ8bXxYj1Ytl1z5AZIaazp06GQwxVrXKJ0Ns Message-ID: Subject: Re: Use pg_current_xact_id() instead of deprecated txid_current() To: Tom Lane Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , pgsql-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 Mon, Feb 9, 2026 at 1:24=E2=80=AFAM Tom Lane wrote: > > =3D?UTF-8?Q?=3DC3=3D81lvaro_Herrera?=3D writes: > > On 2026-02-08, Shinya Kato wrote: > >> Since pg_current_xact_id() returns xid8 which does not support > >> arithmetic operators, places that need "xid + 1" cast the result via > >> ::text::bigint first. > > > I think it may be better to add some operators, or was there a rational= e for these not being there? > > I'm fairly concerned about overloading the arithmetic operators with > unsigned versions. The reason we never invented SQL-level uint8 and > such is fear of getting a lot of "ambiguous operator" errors. Now, > if we are careful not to create implicit casts between xid[8] and > any ordinary type, maybe it'd be okay to invent xid+int, xid8-int, > and a few more. Got it. I=E2=80=99ll give it a try, thanks. > As things stand, I don't find the proposed patch to be an improvement. I agree that casting xid8 to bigint was not the right approach. However, I still believe it's important to move away from using deprecated functions. --=20 Best regards, Shinya Kato NTT OSS Center