Re: cheaper snapshots

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Hannu Krosing <hannu(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: cheaper snapshots
Date: 2011-07-28 20:29:12
Message-ID: CA+TgmoZO9TcCrFK8KEaTxq1zxrjapAuvqWxqA_jrFdduCFtyBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 28, 2011 at 4:12 PM, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Hannu Krosing <hannu(at)2ndQuadrant(dot)com> wrote:
>> but I still think that it is right semantics to make your commit
>> visible to others, even before you have gotten back the
>> confirmation yourself.
>
> Possibly. That combined with building snapshots based on the order
> of WAL entries of commit records certainly has several appealing
> aspects.  It is hard to get over the fact that you lose an existing
> guarantee, though: right now, if you have one synchronous replica,
> you can never see a transaction's work on the master and then *not*
> see it on the slave -- the slave always has first visibility.  I
> don't see how such a guarantee can exist in *either* direction with
> the semantics you describe.  After seeing a transaction's work on
> one system it would always be unknown whether it was visible on the
> other.  There are situations where that is OK as long as each copy
> has a sane order of visibility, but there are situations where
> losing that guarantee might matter.
>
> On the bright side, it means that transactions would become visible
> on the replica in the same order as on the master, and that blocking
> would be reduced.

Having transactions become visible in the same order on the master and
the standby is very appealing, but I'm pretty well convinced that
allowing commits to become visible before they've been durably
committed is throwing the "D" an ACID out the window. If
synchronous_commit is off, sure, but otherwise...

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2011-07-28 20:29:35 Re: New partitioning WAS: Check constraints on partition parents only?
Previous Message Robert Haas 2011-07-28 20:20:04 Re: cheaper snapshots