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

From Andres Freund
Subject Re: Usage of epoch in txid_current
Date
Msg-id 20180716130339.xtgzwb6dgn2blxrc@alap3.anarazel.de
Whole thread Raw
In response to Re: Usage of epoch in txid_current  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Usage of epoch in txid_current  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

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.
> 
> > That should be doable. But I'd like to check if it's necessary
> > first. Optimizing passing an 8 byte struct shouldn't be hard for
> > compilers these days - especially when most things dealing with them are
> > inline functions.  If we find that it's not a problem on contemporary
> > compilers, it might be worthwhile to use a bit more type safety in other
> > places too.
> 
> [ 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!

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: cursors with prepared statements
Next
From: Andres Freund
Date:
Subject: Re: patch to allow disable of WAL recycling