Re: Usage of epoch in txid_current - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Usage of epoch in txid_current
Date
Msg-id 18412.1531749348@sss.pgh.pa.us
Whole thread Raw
In response to Re: Usage of epoch in txid_current  (Andres Freund <andres@anarazel.de>)
Responses Re: Usage of epoch in txid_current  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2018-07-15 16:41:35 -0400, Tom Lane wrote:
>> Andres Freund <andres@anarazel.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!

BTW, independently of any performance questions, these results show
that my idea above was untenable anyway.  On those platforms where
there is a codegen difference, doing it like that would have resulted
in an ABI difference between regular and assert builds.  That's something
to avoid, at least in any API that's visible to extension modules ---
we've had project policy for some time that it should be possible to
use non-assert extensions with assert-enabled core and vice versa.

Conceivably we could have used the struct API only under a special
devel flag that few people use except a buildfarm animal or two.
But that's just a pain in the rear.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Pluggable Storage - Andres's take
Next
From: Tom Lane
Date:
Subject: Re: patch to allow disable of WAL recycling