Re: Serializable Snapshot Isolation - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Serializable Snapshot Isolation
Date
Msg-id 4C9080B9020000250003573D@gw.wicourts.gov
Whole thread Raw
In response to Re: Serializable Snapshot Isolation  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Serializable Snapshot Isolation  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.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


pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Synchronous replication - patch status inquiry
Next
From: Tom Lane
Date:
Subject: Latches, signals, and waiting