Re: WIP patch for serializable transactions with predicate locking - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: WIP patch for serializable transactions with predicate locking
Date
Msg-id 4C3728FE0200002500033336@gw.wicourts.gov
Whole thread Raw
In response to WIP patch for serializable transactions with predicate locking  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
Attached is an updated patch to correct for bitrot and include the
latest work.

Whoever reviews this will probably want to review the Serializable
Wiki page:

http://wiki.postgresql.org/wiki/Serializable

Some areas on which I would particularly appreciate feedback in the
initial review:

CODE ORGANIZATION:  I started with predicate.c based on the lock.c
code, and so fell into the src/backend/storage/lmgr directory.  It
has morphed into something which probably doesn't belong in that
directory, but I'm not sure where it *does* belong.  An argument
could be made that the SSI logic should be split from the predicate
locking, except that there is so little code that isn't part of
tracking the predicate locks and their conflicts, I'm not sure about
that either.  In a similar vein, the structures in predicate.h are
used in exactly one place outside of predicate.c; it might make
sense to split that .h file so that most places only bring in the
function prototypes, which is all they need.  Or perhaps the code
added to lockfuncs.c should be moved to the new predicate.c file,
and called from lockfuncs.c?

NAMING:  The names in predicate.c are somewhat inconsistent, and a
few of them outright annoy me -- particularly MyXxx in a structure
field.  I want to do a pass to make the names more consistent, but
would appreciate any feedback on what's good, bad, or ugly in the
current code before I do.

CORNER CASES:  What did we forget to handle?

-Kevin

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Add a hook in ExecCheckRTPerms().
Next
From: Robert Haas
Date:
Subject: Re: ALTER TABLE SET STATISTICS requires AccessExclusiveLock