From c755b7aaf776235413701813adc6942efedda9fd Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 14 Dec 2015 11:24:59 +0100 Subject: [PATCH] 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 a70eed23771..3600fd67c24 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -2565,7 +2565,7 @@ FlushOneBuffer(Buffer buffer) bufHdr = &BufferDescriptors[buffer - 1]; - LWLockHeldByMe(bufHdr->content_lock); + Assert(LWLockHeldByMe(bufHdr->content_lock)); FlushBuffer(bufHdr, NULL); } -- 2.39.5