Jan Wieck JanWieck at Yahoo.com
Tue Sep 25 08:19:36 PDT 2007
On 9/25/2007 5:51 AM, Marko Kreen wrote:
> On 9/21/07, Christopher Browne <cbbrowne at ca.afilias.info> wrote:
>> Marko Kreen wrote:
>> > On 9/21/07, Christopher Browne <cbbrowne at ca.afilias.info> wrote:
>> >> The only thing that might (or mightn't!) be controversial is that it's
>> >> pretty vital that the implementation remains consistent.
>> >
>> > What inconsistencies are you thinking of?
>>
>> Anything that might cause one implementation to differ from another.
>> (e.g. - where Skytools and Slony-I might have differing code)
>>
>> I have no particular inconsistency in mind; I don't expect any.
>>
>> I don't think there's any *good* reason for them to differ; I'd hope
>> they wouldn't differ.  They can't, otherwise the separate versions
>> would need to be retained.
> 
> Yes, I also don't see any need for differences.
> 
> 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?

   int8          txid_current()
   txid_snapshot txid_current_snapshot()
   int8          txid_snapshot_xmin(sn)
   int8          txid_snapshot_xmax(sn)
   setof int8    txid_snapshot_xip(sn)
   bool          txid_in_snapshot_xip(int8, sn)
   bool          txid_lt_snapshot(int8, sn)
   bool          txid_le_snapshot(int8, sn)
   bool          txid_ge_snapshot(int8, sn)
   bool          txid_gt_snapshot(int8, sn)


> 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.

> It would be good to get the final API soon, so that whenever
> the final merge happens, it would not mean API breakage.  Then
> we can start coding against final API immidiately.

Agreed.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-hackers mailing list