public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Subject: seemingly useless #include recently added
Date: Tue, 25 Apr 2023 11:57:48 +0900 (JST)
Message-ID: <[email protected]> (raw)
Hello.
While working on a patch, I noticed that a rcent commit (d4e71df6d75)
added an apparently unnecessary inclusion of guc.h in smgr.h.
The only change made by the commit to the file is the added #include
directive, which doesn't seem to be functioning, and the build
actually suceeds without it. Moreover, it brings in some
server-related stuff when I incluce smgr.h in storage_xlog.h, causing
compilation issues for pg_rewind.
Should we remove it? Please find the attached patch.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachments:
[text/x-patch] 0001-Remove-unnecessary-include.patch (865B, ../[email protected]/2-0001-Remove-unnecessary-include.patch)
download | inline diff:
From 75d35c25d4cfaeb6fb40e2d451381beac1d5475c Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <[email protected]>
Date: Tue, 25 Apr 2023 11:43:32 +0900
Subject: [PATCH] Remove unnecessary include
The recently added inclusion of guc.h in msgr.h is not necessary and
introduces more server-related stuff. Removing the directive helps
avoid potential issues with including sgmr.h in frontends.
---
src/include/storage/smgr.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h
index 17fba6f91a..a9a179aaba 100644
--- a/src/include/storage/smgr.h
+++ b/src/include/storage/smgr.h
@@ -17,7 +17,6 @@
#include "lib/ilist.h"
#include "storage/block.h"
#include "storage/relfilelocator.h"
-#include "utils/guc.h"
/*
* smgr.c maintains a table of SMgrRelation objects, which are essentially
--
2.31.1
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: seemingly useless #include recently added
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox