]> granicus.if.org Git - postgresql/commit
Make TransactionIdIsInProgress check transam.c's single-item XID status cache
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Mar 2008 20:20:35 +0000 (20:20 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Mar 2008 20:20:35 +0000 (20:20 +0000)
commit611b4393f22f2bb43135501cd6b7591299b6b453
tree5f9eacf6a35487d9fd164dafa694de7ca699dea4
parentba8a9a9282c0c1f962999887bb101b78bd479685
Make TransactionIdIsInProgress check transam.c's single-item XID status cache
before it goes groveling through the ProcArray.  In situations where the same
recently-committed transaction ID is checked repeatedly by tqual.c, this saves
a lot of shared-memory searches.  And it's cheap enough that it shouldn't
hurt noticeably when it doesn't help.
Concept and patch by Simon, some minor tweaking and comment-cleanup by Tom.
src/backend/access/transam/transam.c
src/backend/storage/ipc/procarray.c
src/include/access/transam.h