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

From Alvaro Herrera
Subject Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(
Date
Msg-id 20140428143909.GH25695@eldon.alvh.no-ip.org
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: [COMMITTERS] pgsql: Can't completely get rid of #ifndef FRONTEND in palloc.h :-(
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > Tom Lane wrote:
> >> pg_controldata includes postgres.h not postgres_fe.h, so utils/palloc.h
> >> must be able to compile in a "#define FRONTEND" context.
> 
> > Hmm, I had this patch in an abandoned branch from long ago, which I
> > think helped remove postgres.h from pg_controldata.  I remembered it
> > just now because of this commit message.  Maybe it's useful to re-remove
> > the #ifndef FRONTEND from palloc.h.
> 
> 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.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Minor improvement to fdwhandler.sgml
Next
From: Tom Lane
Date:
Subject: Re: Decrease MAX_BACKENDS to 2^16