v29-0006-Don-t-use-likely-in-find_relids_top_parents.patch

application/octet-stream

Filename: v29-0006-Don-t-use-likely-in-find_relids_top_parents.patch
Type: application/octet-stream
Part: 6
Message: Re: [PoC] Reducing planning time when tables have many partitions

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: format-patch
Series: patch v29-0006
Subject: Don't use likely in find_relids_top_parents
File+
src/include/optimizer/pathnode.h 1 1
From 367a57f208413f2df08824610480d6325c20b08b Mon Sep 17 00:00:00 2001
From: Yuya Watari <watari.yuya@gmail.com>
Date: Fri, 29 Nov 2024 14:49:42 +0900
Subject: [PATCH v29 6/8] Don't use likely in find_relids_top_parents

---
 src/include/optimizer/pathnode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index 5e79cf1f63b..cf21ba29fe9 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -346,7 +346,7 @@ extern Relids find_childrel_parents(PlannerInfo *root, RelOptInfo *rel);
  * root->top_parent_relid_array is NULL.
  */
 #define find_relids_top_parents(root, relids) \
-	(likely((root)->top_parent_relid_array == NULL) \
+	((root)->top_parent_relid_array == NULL \
 	 ? NULL : find_relids_top_parents_slow(root, relids))
 extern Relids find_relids_top_parents_slow(PlannerInfo *root, Relids relids);
 
-- 
2.45.2.windows.1