Re: SSI implementation question - Mailing list pgsql-hackers

From Dan Ports
Subject Re: SSI implementation question
Date
Msg-id 20111019230730.GR68813@csail.mit.edu
Whole thread Raw
In response to Re: SSI implementation question  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
I think it would be fairly sensible to push some of this into
ProcArray, actually. The commit sequence numbers just involve assigning/
incrementing a global counter when taking a snapshot and finishing a
transaction -- that's not too much work, doesn't require any additional
locking beyond ProcArrayLock, and isn't too tied to SSI. (I could
imagine it being useful for other purposes, though I'm not going to
make that argument too seriously without actually having one in mind.)

SxactGlobalXmin and WritableSxactCount are obviously more SSI-specific,
but I think we can come up with something reasonable to do with them.

The part that's harder is building the list of potential conflicts
that's used to identify safe snapshots for r/o transactions. That
(currently) has to happen atomically taking the snapshot. We'll
probably have to do this in some significantly different way, but I
haven't quite worked out what it is yet.

On the bright side, if we can address these three issues, we shouldn't
need to take SerializableXactHashLock at all when starting a
transaction. (Realistically, we might have to take it or some other
lock shared to handle one of them -- but I really want starting a
serializable xact to not take any exclusive locks.)

Dan

-- 
Dan R. K. Ports              MIT CSAIL                http://drkp.net/


pgsql-hackers by date:

Previous
From: Florian Pflug
Date:
Subject: Re: pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces
Next
From: Tom Lane
Date:
Subject: Re: pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces