Re: pgsql: Move SQL-callable code related to multixacts into its own file
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
From: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>, pgsql-committers@lists.postgresql.org
Date: 2025-08-19T15:08:08Z
Lists: pgsql-hackers
Hi,
On Tue, Aug 19, 2025 at 10:28:29AM -0400, Andres Freund wrote:
> Hi,
>
> On 2025-08-19 14:01:52 +0000, Bertrand Drouvot wrote:
> > On Tue, Aug 19, 2025 at 12:31:14PM +0200, Álvaro Herrera wrote:
> > > 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.
>
> That can't be the reason - it's reached from src/test/Makefile
Right, but is src/test/Makefile reached? I think that src/test/Makefile has
to be reached from src/Makefile.
In src/Makefile we already have in SUBDIRS:
test/regress \
test/isolation \
test/perl
and I think we should add test/modules (like proposed).
Does that make sense?
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Commits
-
Avoid including commands/dbcommands.h in so many places
- 325fc0ab14d1 19 (unreleased) landed
-
Remove unneeded header declarations in multixact.c
- 24e71d53f88e 19 (unreleased) landed
-
Move SQL-callable code related to multixacts into its own file
- df9133fa6384 19 (unreleased) cited
-
Create a syscache for pg_database-indexed-by-oid, and make use of it
- cb98e6fb8fd4 8.2.0 cited