Re: Sync Rep: First Thoughts on Code

From: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>
To: Markus Wanner <markus(at)bluegap(dot)ch>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, aidan(at)highrise(dot)ca, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Sync Rep: First Thoughts on Code
Date: 2008-12-13 22:06:05
Message-ID: 494431CD.7070807@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Markus Wanner wrote:
> Tom Lane wrote:
>
>> We won't call it anything, because we never will or can implement that.
>> See the theory of relativity: the notion of exactly simultaneous events
>> at distinct locations isn't even well-defined
>>
>
> That has never been the point of the discussion. It's rather about the
> question if changes from transactions are guaranteed to be visible on
> remote nodes immediately after commit acknowledgment. Whether or not
> this is guaranteed, in both cases the term "synchronous replication" is
> commonly used, which is causing confusion.
>

Might it not be true that anybody unfamiliar would be confused and that
this is a bit of a straw man?

I don't think synchronous replication guarantees that it will be
immediately visible. Even if it did push the change to the other
machine, and the other machine had committed it, that doesn't guarantee
that any reader sees it any more than if I commit to the same machine
(no replication), I am guaranteed to see the change from another
session. Synchronous replication only means that I can be assured that
my change has been saved permanently by the time my commit completes. It
doesn't mean anybody else can see my change or is guaranteed to see my
change if the query from another session.

If my application assumes that it can commit to one server, and then
read back the commit from another server, and my application breaks as a
result, it's because I didn't understand the problem. Even if PostgreSQL
didn't use the word "synchronous replication", I could still be
confused. I need to understand the problem no matter what words are used.

Cheers,
mark

--
Mark Mielke <mark(at)mielke(dot)cc>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2008-12-13 22:13:54 Re: Sync Rep: First Thoughts on Code
Previous Message Aidan Van Dyk 2008-12-13 21:49:13 Re: Sync Rep: First Thoughts on Code