Re: Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(
Date: 2014-04-28 15:19:46
Message-ID: 12924.1398698386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2014-04-28 15:32:15 Re: Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(
Previous Message Alvaro Herrera 2014-04-28 14:39:09 Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-04-28 15:29:14 Re: includedir_internal headers are not self-contained
Previous Message Tom Lane 2014-04-28 14:57:12 Re: Decrease MAX_BACKENDS to 2^16