Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-20 Thread Craig Ringer
On 19 August 2016 at 21:10, Peter Eisentraut wrote: > On 8/18/16 9:20 PM, Craig Ringer wrote: > > On 19 August 2016 at 02:35, Jim Nasby > > wrote: > > I think we need to either add real types for

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-19 Thread Peter Eisentraut
On 8/18/16 9:20 PM, Craig Ringer wrote: > On 19 August 2016 at 02:35, Jim Nasby > wrote: > I think we need to either add real types for handling XID/epoch/TXID > or finally create uint types. It's *way* too easy to screw things

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-18 Thread Craig Ringer
On 19 August 2016 at 02:35, Jim Nasby wrote: > On 8/18/16 5:46 AM, Amit Kapila wrote: > >> I think there is a value in exposing such a variant which takes bigint >> and internally converts it to xid. I am not sure the semantics for >> > > I think that's a bad idea

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-18 Thread Jim Nasby
On 8/18/16 5:46 AM, Amit Kapila wrote: I think there is a value in exposing such a variant which takes bigint and internally converts it to xid. I am not sure the semantics for I think that's a bad idea because you have the exact same problems we have now: bigint is signed, epoch is not.

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-18 Thread Amit Kapila
On Tue, Aug 16, 2016 at 2:45 PM, Craig Ringer wrote: > Hi all > > While implementing support for traceable transactions (finding out after the > fact whether an xact committed or aborted), I've found that Pg is very > inconsistent with what it considers a transaction ID

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-18 Thread Craig Ringer
On 16 August 2016 at 21:44, Craig Ringer wrote: > On 16 August 2016 at 20:58, Greg Stark wrote: > >> On Tue, Aug 16, 2016 at 10:15 AM, Craig Ringer >> wrote: >> > I'm surprised the 32-bit xid was ever exposed to the user, rather than

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-16 Thread Craig Ringer
On 16 August 2016 at 20:58, Greg Stark wrote: > On Tue, Aug 16, 2016 at 10:15 AM, Craig Ringer > wrote: > > I'm surprised the 32-bit xid was ever exposed to the user, rather than a > > 64-bit epoch-extended xid. > > Once upon a time we didn't have epoch

Re: [HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-16 Thread Greg Stark
On Tue, Aug 16, 2016 at 10:15 AM, Craig Ringer wrote: > I'm surprised the 32-bit xid was ever exposed to the user, rather than a > 64-bit epoch-extended xid. Once upon a time we didn't have epoch counting at all. I don't think it would be a bad idea to clean up everything

[HACKERS] [PATCH] bigint txids vs 'xid' type, new txid_recent(bigint) => xid

2016-08-16 Thread Craig Ringer
Hi all While implementing support for traceable transactions (finding out after the fact whether an xact committed or aborted), I've found that Pg is very inconsistent with what it considers a transaction ID from a user facing point of view, to the point where I think it's hard for users to write