public inbox for [email protected]
help / color / mirror / Atom feedFrom: Robert Haas <[email protected]>
To: Aditya Kamath <[email protected]>
Cc: Srirama Kucherlapati <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: AIX support
Date: Wed, 28 Jan 2026 10:41:52 -0500
Message-ID: <CA+TgmoatPGOAfL8Wa3uZ1OGXd34EKOzgm6hXSTa1swS=bbQoag@mail.gmail.com> (raw)
In-Reply-To: <LV8PR15MB64888765A43D229EA5D1CFE6D691A@LV8PR15MB6488.namprd15.prod.outlook.com>
References: <SJ4PPFB817783267BD66F22BFC328D93F81DBA8A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB8177832684055FA99E25A710A09BDBB2A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<SJ4PPFB817783265975DE0984EE26A94891DBBBA@SJ4PPFB81778326.namprd15.prod.outlook.com>
<SJ4PPFB817783261597674B9814FE523944DB8EA@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB8177832645802E05CC9DD299E792DB8CA@SJ4PPFB81778326.namprd15.prod.outlook.com>
<[email protected]>
<SJ4PPFB81778326E995FAD5945ECF752FA1DB96A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<SJ4PPFB81778326EC35CBFA16B5449CFA97DB94A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<lx56bdyuajddthcksde62fze7k2oiy3pfczbsuu6ppngcvud7j@cjgb2zem42li>
<SJ4PPFB817783260F14AB4D9AD2CE247DE8DB91A@SJ4PPFB81778326.namprd15.prod.outlook.com>
<LV8PR15MB64883FC333B351ABD169E874D691A@LV8PR15MB6488.namprd15.prod.outlook.com>
<LV8PR15MB64888765A43D229EA5D1CFE6D691A@LV8PR15MB6488.namprd15.prod.outlook.com>
On Wed, Jan 28, 2026 at 10:20 AM Aditya Kamath <[email protected]> wrote:
> But here is the catch. It won’t pick the AIX system float.h. It will pick the Postgres "src/include/utilsfloat.h”.
PostgreSQL's header should always be included as "utils/float.h" and
the system header should always be included as "float.h" (or, well,
<float.h>, presumably). So this confusion should not exist unless the
include paths are messed up. It doesn't seem correct to me that the
include path includes src/include/utils rather than just src/include,
but I see the same thing here:
"command": "ccache clang
-Isrc/backend/utils/activity/wait_event_names.a.p -Isrc/include/utils
-I../pgsql/src/include/utils -Isrc/include -I../pgsql/src/include
-I/opt/local/include -I/opt/local/include/libxml2
-I/opt/local/libexec/openssl3/include -fdiagnostics-color=always -Wall
-Winvalid-pch -O2 -g -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk
-fno-strict-aliasing -fwrapv -fexcess-precision=standard
-Wmissing-prototypes -Wpointer-arith -Werror=vla
-Werror=unguarded-availability-new -Wendif-labels
-Wmissing-format-attribute -Wcast-function-type -Wformat-security
-Wdeclaration-after-statement -Wmissing-variable-declarations
-Wno-unused-command-line-argument -Wno-compound-token-split-by-macro
-Wno-format-truncation -Wno-cast-function-type-strict -DBUILDING_DLL
-MD -MQ src/backend/utils/activity/wait_event_names.a.p/wait_event.c.o
-MF src/backend/utils/activity/wait_event_names.a.p/wait_event.c.o.d
-o src/backend/utils/activity/wait_event_names.a.p/wait_event.c.o -c
../pgsql/src/backend/utils/activity/wait_event.c",
which happens because of:
wait_event = static_library('wait_event_names',
waitevent_sources,
dependencies: [backend_code],
include_directories: include_directories('../../../include/utils'),
kwargs: internal_lib_args,
)
which happens because wait_event_funcs.c contains:
#include "wait_event_funcs_data.c"
and for some reason, that file gets placed in src/include/utils.
The attached patch, which also adjusts wait_events.c, fixes it for me.
This is kind of a good example of how you are not pursuing your goals
here in the best way possible. The issue here is legitimate, in the
sense that including src/include/utils in the include path for some
file doesn't seem legit to me. But fixing that problem by defining,
just on AIX, the same symbol that the system header defines seems like
clearly the wrong fix. What if we needed to include the actual float.h
somewhere? What if the problem also occurred on some other platform?
Please put a bit more thought into the right ways to (1) describe the
things you find to us and (2) fix them.
Thanks,
--
Robert Haas
EDB: http://www.enterprisedb.com
Attachments:
[application/octet-stream] dont-include-include-utils.patch (1.3K, 2-dont-include-include-utils.patch)
download | inline diff:
diff --git a/src/backend/utils/activity/meson.build b/src/backend/utils/activity/meson.build
index 9f48d5970e1..53bd5a246ca 100644
--- a/src/backend/utils/activity/meson.build
+++ b/src/backend/utils/activity/meson.build
@@ -30,7 +30,6 @@ waitevent_sources = files(
wait_event = static_library('wait_event_names',
waitevent_sources,
dependencies: [backend_code],
- include_directories: include_directories('../../../include/utils'),
kwargs: internal_lib_args,
)
diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c
index e4f2c440257..aca2c8fc742 100644
--- a/src/backend/utils/activity/wait_event.c
+++ b/src/backend/utils/activity/wait_event.c
@@ -503,4 +503,4 @@ pgstat_get_wait_event(uint32 wait_event_info)
return event_name;
}
-#include "pgstat_wait_event.c"
+#include "utils/pgstat_wait_event.c"
diff --git a/src/backend/utils/activity/wait_event_funcs.c b/src/backend/utils/activity/wait_event_funcs.c
index b62ee83ef73..fa10a80b088 100644
--- a/src/backend/utils/activity/wait_event_funcs.c
+++ b/src/backend/utils/activity/wait_event_funcs.c
@@ -31,7 +31,7 @@ static const struct
waitEventData[] =
{
-#include "wait_event_funcs_data.c"
+#include "utils/wait_event_funcs_data.c"
/* end of list */
{NULL, NULL, NULL}
};
view thread (51+ messages) latest in thread
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], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: AIX support
In-Reply-To: <CA+TgmoatPGOAfL8Wa3uZ1OGXd34EKOzgm6hXSTa1swS=bbQoag@mail.gmail.com>
* 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