From: Andres Freund Date: Mon, 14 Dec 2015 10:24:53 +0000 (+0100) Subject: Correct statement to actually be the intended assert statement. X-Git-Tag: REL9_1_20~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=476c54b89b55c980241ee10d6c3fed32e389135f;p=postgresql 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 --- diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index c06b51c9b4..859c486def 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -2253,7 +2253,7 @@ FlushOneBuffer(Buffer buffer) bufHdr = &BufferDescriptors[buffer - 1]; - LWLockHeldByMe(bufHdr->content_lock); + Assert(LWLockHeldByMe(bufHdr->content_lock)); FlushBuffer(bufHdr, NULL); }