vismap-test-invalid.patch

application/octet-stream

Filename: vismap-test-invalid.patch
Type: application/octet-stream
Part: 1
Message: Re: So, is COUNT(*) fast now?

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/access/heap/visibilitymap.c 3 3
diff --git a/src/backend/access/heap/visibilitymap.c b/src/backend/access/heap/visibilitymap.c
index 919e8de..a7a6de2 100644
--- a/src/backend/access/heap/visibilitymap.c
+++ b/src/backend/access/heap/visibilitymap.c
@@ -303,7 +303,7 @@ visibilitymap_test(Relation rel, BlockNumber heapBlk, Buffer *buf)
 #endif
 
 	/* Reuse the old pinned buffer if possible */
-	if (BufferIsValid(*buf))
+	if (!BufferIsInvalid(*buf))
 	{
 		if (BufferGetBlockNumber(*buf) != mapBlock)
 		{
@@ -312,10 +312,10 @@ visibilitymap_test(Relation rel, BlockNumber heapBlk, Buffer *buf)
 		}
 	}
 
-	if (!BufferIsValid(*buf))
+	if (BufferIsInvalid(*buf))
 	{
 		*buf = vm_readbuf(rel, mapBlock, false);
-		if (!BufferIsValid(*buf))
+		if (BufferIsInvalid(*buf))
 			return false;
 	}