Re: typedef indentation in pg_shmem.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: typedef indentation in pg_shmem.h
Date: 2026-01-12 15:01:57
Message-ID: 3935968.1768230117@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> writes:
> The typedefs PGShmemType and HugePagesType are not indented properly.
> That's because those entries are missing from typedefs list. Is that
> intentional?

The reason this happens is that the automatic process for collecting
typedefs in the buildfarm only picks up typedef names that are used
to declare objects (variables, struct fields, function parameters or
results).

AFAICS neither of these typedef names are referenced at all, anywhere.

> Here's tiny patch fixing the indentation and typedefs
> list.

I don't think this is helpful, because that change will just get
undone the next time we absorb the buildfarm's list. (And to be
clear, I consider the buildfarm's list to be the canonical one.)

I think the right way is to remove the unused typedefs, that is
along the lines of

-typedef enum
+enum HugePagesType
{
...
-} HugePagesType;
+};

We can put them back when/if there's a reason to use them.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-01-12 15:05:47 Re: Maybe BF "timedout" failures are the client script's fault?
Previous Message Robert Haas 2026-01-12 14:50:03 Re: pg_plan_advice