Tue Sep 25 09:21:38 PDT 2007
- Previous message: [Slony1-hackers] Re: XID in PG core/contrib
- Next message: [Slony1-hackers] Re: XID in PG core/contrib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/25/07, Jan Wieck <JanWieck at yahoo.com> wrote: > On 9/25/2007 5:51 AM, Marko Kreen wrote: > > Only question that may need discussion is the question of naming. > > > > Current APi is following: > > > > type: txid_snapshot > > > > get_current_txid(): int8 > > get_current_snapshot(): txid_snapshot > > get_snapshot_xmin(sn): int8 > > get_snapshot_xmax(sn): int8 > > get_snapshot_active(sn): setof int8 > > txid_in_snapshot(int8, sn): bool > > > > But it seems kind of random, considering it is targeted to be core > > functinality in the future. I'd prefer something more concise: > > > > type: snapshot > > > > current_txid(): int8 > > current_snapshot(): snapshot > > snapshot_xmin() > > snapshot_xmax() > > snapshot_uncommitted() ?? > > snapshot_contains() ?? > > Eventually all functions should have the txid_ prefix? Ok, sounds reasonable too. > int8 txid_current() > txid_snapshot txid_current_snapshot() > int8 txid_snapshot_xmin(sn) > int8 txid_snapshot_xmax(sn) > setof int8 txid_snapshot_xip(sn) Ok. > bool txid_in_snapshot_xip(int8, sn) Is it really a often used function? Otherwise txid_snapshot_xip() should be enough? > bool txid_lt_snapshot(int8, sn) > bool txid_le_snapshot(int8, sn) > bool txid_ge_snapshot(int8, sn) > bool txid_gt_snapshot(int8, sn) Why so many variants? Isn't one enough? And I think that should be with clearer name like txid_is_visible() or txid_is_committed(). > > Somewhat better but the last 2 functions are still dubious. > > Do you have better names? > > xip means "transactions in progress", and is used that way inside the > backend. So that should be clear enough. Indeed, it's backend vocabulary. -- marko
- Previous message: [Slony1-hackers] Re: XID in PG core/contrib
- Next message: [Slony1-hackers] Re: XID in PG core/contrib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-hackers mailing list