Skip site navigation (1) Skip section navigation (2)

Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: [PATCH 1/5] Centralize Assert* macros into c.h so its common between backend/frontend
Date: 2013-01-08 20:42:05
Message-ID: 20130108204204.GC10185@awork2.anarazel.de (view raw or flat)
Thread:
Lists: pgsql-hackers
On 2013-01-08 17:36:19 -0300, Alvaro Herrera wrote:
> Andres Freund wrote:
> > On 2013-01-08 14:35:12 -0500, Tom Lane wrote:
> > > Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > > > On 2013-01-08 14:25:06 -0500, Tom Lane wrote:
> > > >> This patch seems unnecessary given that we already put a version of Assert()
> > > >> into postgres_fe.h.
> > >
> > > > The problem is that some (including existing) pieces of code need to
> > > > include postgres.h itself, those can't easily include postgres_fe.h as
> > > > well without getting into problems with redefinitions.
> > >
> > > There is no place, anywhere, that should be including both.  So I don't
> > > see the problem.
> >
> > Sorry, misremembered the problem somewhat. The problem is that code that
> > includes postgres.h atm ends up with ExceptionalCondition() et
> > al. declared even if FRONTEND is defined. So if anything uses an assert
> > you need to provide wrappers for those which seems nasty. If they are
> > provided centrally and check for FRONTEND that problem doesn't exist.
>
> I think the right fix here is to fix things so that postgres.h is not
> necessary.  How hard is that?  Maybe it just requires some more
> reshuffling of xlog headers.

I don't really think thats realistic. Think the rmgrdesc/* files and
xlogreader.c itself...

Greetings,

Andres Freund

--
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2013-01-08 20:45:07
Subject: Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it
Previous:From: Andres FreundDate: 2013-01-08 20:39:57
Subject: Re: [PATCH 2/5] Make relpathbackend return a statically result instead of palloc()'ing it

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group