postgres.git / summary / log / commit / refs
commit ea3f30cf69f44ba7c37e0cccfb0aa74d82c98e54
Author: Andres Freund <andres@anarazel.de>
Date: Mon Dec 14 10:24:55 2015 +0000
First released in: 9.6.0, 9.1.20, 9.2.15, 9.3.11, 9.4.6, 9.5.0
Correct statement to actually be the intended assert statement.
e3f4cfc7 introduced a LWLockHeldByMe() call, without the corresponding
Assert() surrounding it.
Spotted by Coverity.
Backpatch: 9.1+, like the previous commit
src/backend/storage/buffer/bufmgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 81b9b297724..8dbe0f169f6 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -2412,7 +2412,7 @@ FlushOneBuffer(Buffer buffer)
bufHdr = &BufferDescriptors[buffer - 1];
- LWLockHeldByMe(bufHdr->content_lock);
+ Assert(LWLockHeldByMe(bufHdr->content_lock));
FlushBuffer(bufHdr, NULL);
}
[parent: 6436445e9f31]