Re: pgstat include expansion

From: Alvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: pgstat include expansion
Date: 2026-02-16 16:32:27
Message-ID: 202602161622.cu4mpoh445mg@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Feb-16, Amit Kapila wrote:

> How about moving LogicalRepWorkerType to logicalworker.h as in the
> attached and then include that in pgstat.h? This requires few other
> adjustments as previously some of the includes were working indirectly
> via worker_internal.h.

Yeah, I think the inclusion of worker_internal.h in pgstat.h is
catastrophic, and the additions of .h files that you propose to fix them
after the removal look OK to me, though I didn't try to compile or run
headerscheck, though you should before pushing.

I'm not sure about including logicalworker.h in pgstat.h though, given
the prototypes you have there ... the logical worker type enum does not
fit together with those IMO.

Maybe it'd be better to add a new file for pgstat_subscription.c and
pgstat.h to use, where this enum lives. (Maybe something like
src/include/replication/pgstat_worker.h or
src/include/replication/worker_stat.h ?)

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"La espina, desde que nace, ya pincha" (Proverbio africano)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Timur Magomedov 2026-02-16 16:35:46 Re: [WIP]Vertical Clustered Index (columnar store extension) - take2
Previous Message Andrew Dunstan 2026-02-16 16:28:58 Re: [PATCH] pgindent truncates last line of files missing a trailing newline