Re: Should we add xid_current() or a int8->xid cast?

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: btfujiitkp <btfujiitkp@oss.nttdata.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-01-28T05:05:24Z
Lists: pgsql-hackers

Attachments

On Tue, Dec 3, 2019 at 6:56 AM Mark Dilger <hornschnorter@gmail.com> wrote:
> On 11/30/19 5:14 PM, Thomas Munro wrote:
> > On Sun, Dec 1, 2019 at 12:22 PM Mark Dilger <hornschnorter@gmail.com> wrote:
> >> These two patches (v3) no longer apply cleanly.  Could you please
> >> rebase?
> >
> > Hi Mark,
> > Thanks.  Here's v4.
>
> Thanks, Thomas.
>
> The new patches apply cleanly and pass 'installcheck'.

I rebased, fixed the "xid_snapshot_xip" problem spotted by Takao Fujii
that I had missed earlier, updated a couple of error messages to refer
to the new names (even when using the old functions) and ran
check-world and some simple manual tests on an -m32 build just to be
paranoid.  Here are the versions of these patches I'd like to commit.
Does anyone want to object to the txid/xid8 type punning scheme or
long term txid-sunsetting plan?

Commits

  1. Introduce xid8-based functions to replace txid_XXX.

  2. Add SQL type xid8 to expose FullTransactionId to users.

  3. Replace the former method of determining snapshot xmax --- to wit, calling