diff options
| author | Tom Lane | 2008-03-11 20:20:35 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-03-11 20:20:35 +0000 |
| commit | 611b4393f22f2bb43135501cd6b7591299b6b453 (patch) | |
| tree | 5f9eacf6a35487d9fd164dafa694de7ca699dea4 /src/include/access | |
| parent | ba8a9a9282c0c1f962999887bb101b78bd479685 (diff) | |
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.
Diffstat (limited to 'src/include/access')
| -rw-r--r-- | src/include/access/transam.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 1887f9d0ab3..232c59cad3c 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/transam.h,v 1.64 2008/01/01 19:45:56 momjian Exp $ + * $PostgreSQL: pgsql/src/include/access/transam.h,v 1.65 2008/03/11 20:20:35 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -138,6 +138,7 @@ extern VariableCache ShmemVariableCache; */ extern bool TransactionIdDidCommit(TransactionId transactionId); extern bool TransactionIdDidAbort(TransactionId transactionId); +extern bool TransactionIdIsKnownCompleted(TransactionId transactionId); extern void TransactionIdCommit(TransactionId transactionId); extern void TransactionIdAsyncCommit(TransactionId transactionId, XLogRecPtr lsn); extern void TransactionIdAbort(TransactionId transactionId); |
