Re: PostgreSQL not ACID compliant? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PostgreSQL not ACID compliant?
Date
Msg-id 29391.1064094527@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL not ACID compliant?  (Florian Weimer <fw@deneb.enyo.de>)
Responses Re: PostgreSQL not ACID compliant?
List pgsql-hackers
Florian Weimer <fw@deneb.enyo.de> writes:
> Is this a bug, or is SQLxx serializability defined in different terms?

Strictly speaking, we do not guarantee serializability because we do not
do predicate locking.  See for example
http://archives.postgresql.org/pgsql-general/2003-01/msg01581.php

AFAIK, no commercial database does predicate locking either, so we all
fall short of true serializability.  The usual solution if you need the
sort of behavior you're talking about is to take a non-sharable write
lock on the table you want to modify, so that only one transaction can
do the COUNT/INSERT at a time.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Can't Build 7.3.4 on OS X
Next
From: Gaetano Mendola
Date:
Subject: Re: 7.4beta2 vs 7.3.3