Re: Usage of epoch in txid_current

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>,Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>,Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>,Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Usage of epoch in txid_current
Date: 2019-02-04 06:21:50
Message-ID: F6FA5A92-FAC7-4F45-8923-75859B5EAB63@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On February 4, 2019 6:43:44 AM GMT+01:00, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>On Sun, Feb 03, 2019 at 10:58:02PM +1100, Thomas Munro wrote:
>> If there are no objections, I'm planning to do a round of testing and
>> commit this shortly.
>
>Hm. That looks sane to me at quick glance. I am a bit on the edge
>regaring the naming "FullTransactionId", which is actually a 64-bit
>value with a 32-bit XID and a 32-bit epoch. Something like
>TransactionIdWithEpoch or EpochTransactionId sounds a bit better to
>me. My point is that "Full" is too generic for that.

I'm not a fan of names with epoch in it - these are the real transaction IDs now. Conflating them with the until-now inferred epochs sounds like a bad idea to me. We IMO should just treat the new type as a 64bit uint, and the 32bit as a truncated version. Like, we could just add 64 as a prefix.

Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-02-04 06:28:35 Commit Fest 2019-01 is now closed
Previous Message Michael Paquier 2019-02-04 06:21:46 Re: [HACKERS] Can ICU be used for a database's default sort order?