Re: Proposal: Commit timestamp

From: "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>
To: "Theo Schlossnagle" <jesus(at)omniti(dot)com>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "Jim Nasby" <decibel(at)decibel(dot)org>, "Jan Wieck" <JanWieck(at)Yahoo(dot)com>
Subject: Re: Proposal: Commit timestamp
Date: 2007-02-05 11:20:25
Message-ID: E1539E0ED7043848906A8FF995BDA57901B7D76A@m0143.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> One concept is to have a univeral clock that ticks forward (like
> every second) and each node orders all their transactions inside the
> second-granular tick. Then each commit would be like: {node,
> clocksecond, txn#} and each time the clock ticks forward, txn# is
> reset to zero. This gives you ordered txns that windowed in some
> cluster-wide acceptable window (1 second). However, this is totally
> broken as NTP is entirely insufficient for this purpose because of a
> variety of forms of clock skew. As such, the timestamp should be
> incremented via cluster consensus (one token ring or the pulse
> generated by the leader of the current cluster membership quorom).

I think you are completely ignoring practicability. Or are you saying,
that such a system exists and works for e.g. a loosly connected group of
laptop field agents that only sporadically have a connection to the
cluster.

I think Jan's definition gives a pragmatic solution to the problem,
and will be able to give "good" automatic conflict resolution.

It has downsides he stated, and cannot guarantee 100% correct automatic
conflict
resolution in case of connection loss, but I am quite sure you are not
able to do
better, without loosing yourself in theory.

e.g. assume all clocks vary by no more than 30 seconds when
disconnected, you can
require manual (or rule based) resolution to all conflicts that vary by
less than
1 minute.

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-02-05 11:26:01 Re: [PATCHES] Fix "database is ready" race condition
Previous Message Hannu Krosing 2007-02-05 07:38:35 Re: Performance penalty of visibility info in indexes?