Re: [Q] Serializable

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ladislav Lenart <lenartlad(at)volny(dot)cz>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [Q] Serializable
Date: 2015-09-24 17:24:01
Message-ID: CAKFQuwZ2oR-3RJP0vJ+p0R4xSk7PG1xfTev-CL50rBZ1GJSN4A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 24, 2015 at 12:15 PM, Ladislav Lenart <lenartlad(at)volny(dot)cz>
wrote:

> Hello.
>
> I would like to know how SERIALIZABLE behaves.
>
> Suppose I have two (or more) concurrent DB transactions:
> * Each runs in SERIALIZABLE.
> * Each updates (insert / update / delete) different rows in the same table.
>
> Can I get serializable failures (i.e. ERROR: could not serialize access
> due to
> read/write dependencies among transactions)?
>
> This is on 9.4.
>
> Thank you in advance,
>

​Probably not but there seems to be insufficient information provided to
prove this. You seem to probably have the "write dependency" covered but
you mention nothing about "read dependencies".

Why not just assume it can and put code in place to handle that possibility
- especially since you should probably be frameworking database access to
enforce that all parts of the system use SERIALIZABLE?

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2015-09-24 19:57:18 Dropped connections with pg_basebackup
Previous Message Ladislav Lenart 2015-09-24 16:15:00 [Q] Serializable