Re: Question About Serializable

From: Aaron Carlisle <aaron(dot)carlisle(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question About Serializable
Date: 2013-09-19 06:06:48
Message-ID: CAMSsDqXco5_=NJe=V=e5X15Js9VzxHo9dLtsce=-fyUxfwbi8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

No particular effort; I saw a talk on the topic. I said it's academic
because I can't think of any real world example where this would matter
(the other definition of the word "academic").

On Thu, Sep 19, 2013 at 12:44 AM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:

> Aaron Carlisle <aaron(dot)carlisle(at)gmail(dot)com> wrote:
>
> > The documentation states that "concurrent execution of a set of
> > Serializable transactions is guaranteed to produce the same
> > effect as running them one at a time in some order."
> >
> > I'm not sure how the following behavior fits that definition.
> > (Note that this is just an experiment, not a use case. Purely
> > academic.) I run these transactions sequentially, and I get a
> > different result than if I run them concurrently.
>
> > It seems like one of these should error out and not commit, so I
> > must be missing some stipulation.
>
> > [ write skew in pg_class with table creation and check for table
> > existence in two concurrent queries ]
>
> You are correct, and not missing anything -- when serializable
> behavior was added (and through 9.3) the system catalogs were not
> fully transactional using the MVCC semantics. I'm afraid there
> were many strange things that could happen with the system
> catalogs, including having an object which was being updated be
> missed or seen twice by a concurrent transaction, none of which was
> documented. Since the serializable techniques in PostgreSQL are
> based on the MVCC snapshot isolation techniques, it was not
> possible to cover DDL in the serializable implementation using
> Serializable Snapshot Isolation.
>
> I assume you can't create such problems in a stable schema; but
> only when serializable transactions include DDL?
>
> On the 9.4 development branch access to the system catalogs has
> recently been made to use MVCC techniques, so it may be possible to
> extend serializable behavior to the catalogs in 9.4 or later.
>
> I don't suppose you want to help develop a patch for that? :-)
>
> Out of curiosity, is there a particular academic effort this
> question came out of that you can talk about?
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2013-09-19 06:09:24 Re: Query - CPU issue
Previous Message Kevin Grittner 2013-09-19 05:44:32 Re: Question About Serializable