Hi hackers,

While reviewing the import/export statistics, I noticed that relation locking are handled via relation_open() and relation_close() in stats_lock_check_privileges(), and no calls to other lock-manager routines are actually used there. As a result, the inclusion of the lock-manager header

#include "storage/lmgr.h"

is not needed. I have attached a small patch which simply removes that include.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.
From ddd4b49b8a11952f7c2c161ec20d9d5b7d6b1288 Mon Sep 17 00:00:00 2001
From: Ilia Evdokimov <ilya.evdoki...@tantorlabs.com>
Date: Mon, 5 May 2025 16:19:35 +0300
Subject: [PATCH v1] Remove unused lmgr.h from statistics utilities

---
 src/backend/statistics/stat_utils.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/backend/statistics/stat_utils.c b/src/backend/statistics/stat_utils.c
index a9a3224efe6..798044dad89 100644
--- a/src/backend/statistics/stat_utils.c
+++ b/src/backend/statistics/stat_utils.c
@@ -23,7 +23,6 @@
 #include "funcapi.h"
 #include "miscadmin.h"
 #include "statistics/stat_utils.h"
-#include "storage/lmgr.h"
 #include "utils/acl.h"
 #include "utils/array.h"
 #include "utils/builtins.h"
-- 
2.34.1

Reply via email to