Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> wrote:
 
> Hmm, I think it would be simpler to decide that instead of 
> SerializableXactHashLock, you must hold ProcArrayLock to access 
> LastSxactCommitSeqNo, and move the assignment of commitSeqNo to 
> ProcArrayTransaction(). It's probably easiest to move 
> LastSxactCommitSeqno to ShmemVariableCache too. There's a few
> places that would then need to acquire ProcArrayLock to read 
> LastSxactCommitSeqno, but I feel it might still be much simpler
> that way.
 
We considered that.  I think the biggest problem was that when there
is no XID it wouldn't be covered by the lock on assignment.  We
couldn't see a good way to increment and assign the value without LW
lock coverage, and we didn't want to add LW locking to that code
path.  If you can see a way around that issue, I agree it would be
simpler.
 
-Kevin

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to