Re: User-facing aspects of serializable transactions - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: User-facing aspects of serializable transactions
Date
Msg-id 4A23F2A7.EE98.0025.1@wicourts.gov
Whole thread Raw
In response to Re: User-facing aspects of serializable transactions  (Greg Stark <stark@enterprisedb.com>)
Responses Re: User-facing aspects of serializable transactions
List pgsql-hackers
Greg Stark <stark@enterprisedb.com> wrote:
> On Mon, Jun 1, 2009 at 8:55 PM, Kevin Grittner
> <Kevin.Grittner@wicourts.gov> wrote:
>> You can be sure you've written your transaction safely just as soon
>> as your COMMIT returns without error.
> 
> I think we have different definitions of "safely". You only know
> that you got away with it *this time* when the commit returns
> without error.
> 
> I'm concerned with whether you can be sure that the 999th time you
> run it the database won't randomly decide to declare a serialization
> failure for reasons you couldn't predict were possible.
Now you're questioning whether SERIALIZABLE transaction isolation
level is useful.  Probably not for everyone, but definitely for some.
As stated before, the trade-off is that you don't need to know what
all the transactions look like or which ones might be run concurrently
in order to guarantee that you avoid anomalies; but you need to be
able to handle the rollback of any serializable transaction.  Nothing
in the proposed techniques would create problems like you describe in
transactions running at other isolation levels, or preclude taking out
explicit locks to prevent this where you need additional guarantees --
like needing to be sure that a transaction won't be rolled back with a
serialization failure after 10 hours.
-Kevin


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: It's June 1; do you know where your release is?
Next
From: Zdenek Kotala
Date:
Subject: Re: list_head naming conflict gcc 4.2/perl/solaris