Re: pgsql: Move SQL-callable code related to multixacts into its own file - Mailing list pgsql-committers

From Álvaro Herrera
Subject Re: pgsql: Move SQL-callable code related to multixacts into its own file
Date
Msg-id 202508191031.5ipojyuaswzt@alvherre.pgsql
Whole thread Raw
In response to Re: pgsql: Move SQL-callable code related to multixacts into its own file  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: Move SQL-callable code related to multixacts into its own file
Re: pgsql: Move SQL-callable code related to multixacts into its own file
List pgsql-committers
On 2025-Aug-18, Tom Lane wrote:

> Michael Paquier <michael@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.  It also seems more sensible to declare
get_database_oid() in pg_database.h.  After these two changes, a lot of
files can stop including dbcommands.h.  This seems a nice cleanup to me,
and passes headerscheck.


-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/

Attachment

pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: doc: Improve pgoutput documentation.
Next
From: Bertrand Drouvot
Date:
Subject: Re: pgsql: Move SQL-callable code related to multixacts into its own file