Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> Hm. It would certainly be better if pg_controldata could use
>> postgres_fe.h not postgres.h, but I'm confused about how the new header
>> added by this patch helps that? None of the declarations you removed from
>> xlog.h look like they'd be more problematic than the ones you left behind.
> The point IIRC was to be able to remove stuff that required type Datum
> to be defined:
> -extern void ShutdownXLOG(int code, Datum arg);
> which led to the idea that the new header would be about process control
> for xlog.c.
Oh, Datum was the issue? I see. But then this approach is basically
requiring that we can never reference Datum in any header that
pg_controldata uses. Which seems like a pretty draconian limitation,
particularly if the headers involved are general-purpose ones like xlog.h.
What might be less breakable is to identify exactly which declarations
pg_controldata needs out of this file and push just those into some new
header.
However, pg_controldata is just the tip of the iceberg --- to get any
mileage out of this, we'd also have to make pg_resetxlog and pg_xlogdump
able to compile with only postgres_fe.h, so there might be too much stuff
involved.
regards, tom lane