Re: cheaper snapshots - Mailing list pgsql-hackers

From Robert Haas
Subject Re: cheaper snapshots
Date
Msg-id CA+TgmoaykSnfGERXRe-+2+iqZj=H+fQ+L1f=6hKpX=5eAEhiuA@mail.gmail.com
Whole thread Raw
In response to Re: cheaper snapshots  (Ants Aasma <ants.aasma@eesti.ee>)
List pgsql-hackers
On Thu, Jul 28, 2011 at 8:12 PM, Ants Aasma <ants.aasma@eesti.ee> wrote:
> On Fri, Jul 29, 2011 at 2:20 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> Well, again, there are three levels:
>>
>> (A) synchronous_commit=off.  No waiting!
>> (B) synchronous_commit=local transactions, and synchronous_commit=on
>> transactions when sync rep is not in use.  Wait for xlog flush.
>> (C) synchronous_commit=on transactions when sync rep IS in use.  Wait
>> for xlog flush and replication.
> ...
>> So basically, you can't be more asynchronous than the guy in front of
>> you.
>
> (A) still gives a guarantee - transactions that begin after the commit
> returns see
> the commited transaction. A weaker variant would say that if the commit
> returns, and the server doesn't crash in the meantime, the commit would at
> some point become visible. Maybe even that transactions that begin after the
> commit returns become visible after that commit.

Yeah, you could do that.  But that's such a weak guarantee that I'm
not sure it has much practical utility.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: cheaper snapshots
Next
From: Noah Misch
Date:
Subject: Re: sinval synchronization considered harmful