mbind_check_errcode.cfbotignorepatch

application/octet-stream

Filename: mbind_check_errcode.cfbotignorepatch
Type: application/octet-stream
Part: 1
Message: Re: Adding basic NUMA awareness
diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c
index 1f93a31d451..52c245de5a2 100644
--- a/src/backend/storage/buffer/buf_init.c
+++ b/src/backend/storage/buffer/buf_init.c
@@ -355,7 +355,8 @@ BufferPartitionsInit(void)
 			endptr = (char *) TYPEALIGN_DOWN(numa_page_size, endptr);
 
 			/* XXX or should we use pg_numa_move_to_node? */
-			pg_numa_bind_to_node(startptr, endptr, n);
+			if (pg_numa_bind_to_node(startptr, endptr, n) != 0)
+				elog(WARNING, "mbind(): %m");
 
 			/* buffer descriptors */
 
@@ -378,7 +379,8 @@ BufferPartitionsInit(void)
 			endptr = (char *) TYPEALIGN_DOWN(numa_page_size, endptr);
 
 			/* XXX or should we use pg_numa_move_to_node? */
-			pg_numa_bind_to_node(startptr, endptr, n);
+			if (pg_numa_bind_to_node(startptr, endptr, n) != 0)
+				elog(WARNING, "mbind(): %m");
 		}
 #endif
 	}