Skip site navigation (1) Skip section navigation (2)

Re: cheaper snapshots

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Hannu Krosing" <hannu(at)2ndQuadrant(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: cheaper snapshots
Date: 2011-07-28 20:12:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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.

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2011-07-28 20:19:10
Subject: Re: cheaper snapshots
Previous:From: Hannu KrosingDate: 2011-07-28 19:59:27
Subject: Re: cheaper snapshots

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group