Re: Proposal: Commit timestamp - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Proposal: Commit timestamp
Date
Msg-id 45B94BD8.2000202@Yahoo.com
Whole thread Raw
In response to Re: Proposal: Commit timestamp  (Neil Conway <neilc@samurai.com>)
Responses Re: Proposal: Commit timestamp
List pgsql-hackers
On 1/25/2007 6:47 PM, Neil Conway wrote:
> On Thu, 2007-01-25 at 18:16 -0500, Jan Wieck wrote:
>> For conflict resolution purposes in an asynchronous multimaster system, 
>> the "last update" definition often comes into play. For this to work, 
>> the system must provide a monotonically increasing timestamp taken at 
>> the commit of a transaction.
> 
> Do you really need an actual timestamptz derived from the system clock,
> or would a monotonically increasing 64-bit counter be sufficient? (The
> assumption that the system clock is monotonically increasing seems
> pretty fragile, in the presence of manual system clock changes, ntpd,
> etc.)

Yes, I do need it to be a timestamp, and one assumption is that all 
servers in the multimaster cluster are ntp synchronized. The reason is 
that this is for asynchronous multimaster (in my case). Two sequences 
running on separate systems don't tell which was the "last update" on a 
timeline. This conflict resolution method alone is of course completely 
inadequate.

> 
>> Comments, changes, additions?
> 
> Would this feature have any use beyond the specific project/algorithm
> you have in mind?

The tablelog project on pgfoundry currently uses the transactions start 
time but would be very delighted to have the commit time available instead.


Jan

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: No ~ operator for box, point
Next
From: Tom Lane
Date:
Subject: Re: Proposal: Change of pg_trigger.tg_enabled and adding pg_rewrite.ev_enabled