Re: Usage of epoch in txid_current

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Usage of epoch in txid_current
Date: 2018-07-24 05:24:32
Message-ID: CAEepm=0J_VgnAtMidE6k78MBJSeTUJOJupAuVbrEt5t_xsXmGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Tue, Jul 17, 2018 at 1:55 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
>> On 2018-07-15 16:41:35 -0400, Tom Lane wrote:
>>> Andres Freund <andres(at)anarazel(dot)de> writes:
>>>> On 2018-07-09 19:56:25 -0400, Tom Lane wrote:
>>>>> Or, perhaps, use a struct in assert builds and int64 otherwise?
>>>>> You could hide the ensuing notational differences in macros.
>
>>> [ bunch of test results ]
>>> Offhand it would seem that we can get away with struct wrappers
>>> on any platform where performance is really of concern today.
>
>> Cool, thanks for checking!

+1

Here's a new version. I did some cosmetic clean-up, and I dropped the
changes to pg_controldata output, replication epoch/xid processing
code and various similar non-essential changes. For this patch I want
just the new type + next xid generator + appropriate conversions.

I propose that we get this committed early in the cycle. That'd
maximise testing time in the tree, fix the bug identified by Amit, and
leave plenty of time for later patches to use FullTransactionId in
more places as appropriate.

Does anyone have specific kinds of validation or testing they'd like to see?

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
0001-Track-the-next-xid-using-64-bits-v5.patch application/octet-stream 44.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-07-24 05:25:40 Re: BUG #15182: Canceling authentication due to timeout aka Denial of Service Attack
Previous Message Michael Paquier 2018-07-24 05:23:02 Re: BUG #15182: Canceling authentication due to timeout aka Denial of Service Attack