diff options
| author | Tom Lane | 2004-06-11 16:43:24 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-06-11 16:43:24 +0000 |
| commit | e6cba71503fa80948a050e7e0126e932855e92cc (patch) | |
| tree | ba900986f16b75133bf68f63458bd7bbbc440d9e /src/include | |
| parent | 8d64b56206a73ac8413ab8b4a035e62e95f6ba99 (diff) | |
Add some code to Assert that when we release pin on a buffer, we are
not holding the buffer's cntx_lock or io_in_progress_lock. A recent
report from Litao Wu makes me wonder whether it is ever possible for
us to drop a buffer and forget to release its cntx_lock. The Assert
does not fire in the regression tests, but that proves little ...
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/lwlock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/storage/lwlock.h b/src/include/storage/lwlock.h index e06d9a4bf77..b1f6fc95103 100644 --- a/src/include/storage/lwlock.h +++ b/src/include/storage/lwlock.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.11 2004/05/31 03:48:10 tgl Exp $ + * $PostgreSQL: pgsql/src/include/storage/lwlock.h,v 1.12 2004/06/11 16:43:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -62,6 +62,7 @@ extern void LWLockAcquire(LWLockId lockid, LWLockMode mode); extern bool LWLockConditionalAcquire(LWLockId lockid, LWLockMode mode); extern void LWLockRelease(LWLockId lockid); extern void LWLockReleaseAll(void); +extern bool LWLockHeldByMe(LWLockId lockid); extern int NumLWLocks(void); extern int LWLockShmemSize(void); |
