Re: Serializable Isolation without blocking

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: <nicolas(dot)barbier(at)gmail(dot)com>,<gsstark(at)mit(dot)edu>, <pgsql-hackers(at)postgresql(dot)org>, <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: Re: Serializable Isolation without blocking
Date: 2010-01-13 21:54:41
Message-ID: 4B4DECC1020000250002E478@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> Nope, you're on target. Although - if I were you - I would post
> the ACCESS EXCLUSIVE lock version of the patch for feedback. I
> can't speak for anyone else, but I'll read it.

Here you go! :-)

This is the milestone of having full serializable behavior, albeit
with horrible performance, using the simplest implementation
possible. I didn't use ACCESS EXCLUSIVE locks, because on review it
seemed to me that a SHARE lock would be strong enough. It compiles
and passes the regression tests, and I've been testing some of the
scenarios previously used to show the snapshot anomalies; I now get
correct behavior through blocking.

I identified the points to insert predicate locking by looking for
places where ExecStoreTuple was called with a valid heap buffer; if
there is anywhere that obtains tuples from the heap without going
through that method, I have more work to do. If anyone knows of
such locations, I'd be grateful for a "heads up".

If I've done anything horribly wrong in organizing the code, that'd
be nice to hear about before I go too much farther, too.

I'm definitely not looking for this to be committed, but should I
add it to the CF page just for a "feedback" review? (I'm OK with
keeping it more ad hoc, especially if it's going to hold up the
beta at all.)

-Kevin

Attachment Content-Type Size
serializable-002.patch text/plain 16.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-01-13 22:03:33 Re: primary key display in psql
Previous Message Peter Eisentraut 2010-01-13 21:49:59 per-user pg_service.conf