Hi, On Tue, Aug 19, 2025 at 12:31:14PM +0200, Álvaro Herrera wrote: > On 2025-Aug-18, Tom Lane wrote: > > > Michael Paquier <mich...@paquier.xyz> writes: > > > On Mon, Aug 18, 2025 at 09:47:14AM -0400, Tom Lane wrote: > > >> Couldn't this have removed some #include-s from multixact.c? > > > > > Right. funcapi.h and fmgrprotos.h are direct dependencies, but > > > looking closer it is also possible to remove four more of them. > > > > Sounds good! > > Hmm, don't you find strange that dbcommands.h is still included there? > I wondered about that and found out that we have get_database_name() > declared there. It sort-of makes sense, because it was originally done > by scanning pg_database, but since commit cb98e6fb8fd4 introduced a > syscache for it, we can have this routine in lsyscache.c/h instead, > where it feels more at home.
That makes sense to me. > It also seems more sensible to declare > get_database_oid() in pg_database.h. Yes. > After these two changes, a lot of > files can stop including dbcommands.h. This seems a nice cleanup to me, > and passes headerscheck. meson does report: ../src/test/modules/worker_spi/worker_spi.c: In function ‘worker_spi_launch’: ../src/test/modules/worker_spi/worker_spi.c:455:25: error: implicit declaration of function ‘get_database_oid’ [-Wimplicit-function-declaration] 455 | dboid = get_database_oid(worker_spi_database, false); It looks like pg_database.h include is missing in worker_spi.c. That said, autoconf does not report the issue, and that's because test/modules is missing in src/Makefile. Is there any reasons for that? If not, the attached fix it. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
>From 8241c09d6837cd9123ba3177cc261804ea656fb9 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot <bertranddrouvot...@gmail.com> Date: Tue, 19 Aug 2025 13:58:34 +0000 Subject: [PATCH v1] Add test/modules to src/Makefile meson does compile test/modules so let's be consistent in autoconf. --- src/Makefile | 1 + 1 file changed, 1 insertion(+) 100.0% src/ diff --git a/src/Makefile b/src/Makefile index 2f31a2f20a7..fd601c47039 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,6 +27,7 @@ SUBDIRS = \ bin \ pl \ makefiles \ + test/modules \ test/regress \ test/isolation \ test/perl -- 2.34.1