Re: Proposal: Commit timestamp

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Naz Gassiep <naz(at)mira(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Commit timestamp
Date: 2007-01-27 14:14:02
Message-ID: 45BB5E2A.3070103@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/27/2007 7:26 AM, Gregory Stark wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
>
>> I think the system I described is a slightly modified Lamport generator. The
>> maximum timestamp of any row updated in this transaction, you can consider that
>> the "counters received from other nodes". Then I make sure that the next
>> counter (timestamp) is higher than anything I know so far, and I add
>> cluster-wide unique tie breaker to that.
>
> If you know all the timestamps in the system then you don't need timestamps at
> all, just use a counter that you increment by one each time.
>
> Isn't the whole reason people use timestamps is so that you don't have to
> depend on atomically knowing every timestamp in the system? So two
> transactions can commit simultaneously on different systems and use the
> timestamps to resolve conflicts later.

This assumes that you never lose contact to the cluster or if so,
instantly stop all update activity because you are at risk that the
counters diverge. This risk is much higher with a simple counter than
with a system clock that was in sync at the time of disconnect.

With all the disadvantages and the pain factor of an asynchronous
multimaster replication system comes one big advantage. You can continue
autonomously and let conflict resolution figure it out later.

Jan

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2007-01-27 14:27:59 windows/ecpg regression tests failing
Previous Message Joachim Wieland 2007-01-27 13:32:12 Re: [HACKERS] Searching some sites explaing about