Re: Serializable Snapshot Isolation

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "Dan Ports" <drkp(at)csail(dot)mit(dot)edu>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Serializable Snapshot Isolation
Date: 2010-09-15 13:15:53
Message-ID: 4C9080B9020000250003573D@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

> Now that I understand what the predicate locks are for, I'm now
> trying to get my head around all the data structures in
> predicate.c. The functions are well commented, but an overview at
> the top of the file of all the hash tables and other data
> structures would be nice. What is stored in each, when are they
> updated, etc.

It probably doesn't help that they're split between predicate.c and
predicate.h. (They were originally all in predicate.c because
nobody else needed to see them, but we moved some to the .h file to
expose them to lockfuncs.c to support listing the locks.)

I'm inclined to move everything except the function prototypes out
of predicate.h to a new predicate_interal.h, and move the structures
defined in predicate.c there, too. And, of course, add the overview
comments in the new file. If that sounds good, I can probably
post a new patch with those changes today -- would that be a good
idea, or should I wait for more feedback before doing that? (It
will be in the git repo either way.)

> BTW, does the patch handle prepared transactions yet? It
> introduces a call to PreCommit_CheckForSerializationFailure() in
> CommitTransaction, I think you'll need that in PrepareTransaction
> as well.

Good point. In spite of the NB comment, I did not notice that.
Will fix.

Thanks for the feedback!

-Kevin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-15 13:55:30 Latches, signals, and waiting
Previous Message Fujii Masao 2010-09-15 12:39:33 Re: Synchronous replication - patch status inquiry