pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix thinko in previous commit
Date: Tue, 09 Oct 2012 13:07:36 -0400
Message-ID: <25905.1349802456@sss.pgh.pa.us> (raw)
In-Reply-To: <20121009122009.GB4214@alvh.no-ip.org>
References: <E1TLKxW-0005Jx-8N@gemulon.postgresql.org>
	<20121009041314.GC28686@alvh.no-ip.org>
	<20695.1349757261@sss.pgh.pa.us>
	<2547.1349760458@sss.pgh.pa.us>
	<20121009122009.GB4214@alvh.no-ip.org>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Tom Lane wrote:
>> Looking again at the spoonbill failure, it's striking that it gets as
>> far as plpython before choking.  The symptoms are consistent with the
>> theory that USE_INLINE is getting #define'd by some Python header or
>> other, after having *not* been defined by pg_config.h.  Maybe we should
>> rename that to PG_USE_INLINE?

> Ahh, that makes a lot of sense, yes; and I see that the Python headers
> in my machine do mention USE_INLINE (though this is not defined, even on
> pyconfig.h), so it is indeed possible that on some other machines it is
> defined somewhere in those headers.  I will go rename ours.  Thanks for
> the research.

I'd not tried a build with plpython on my old HPUX box recently, but
looking into its Python headers I find

$ grep -r USE_INLINE /usr/local/include/python2.5
/usr/local/include/python2.5/pyport.h:#undef USE_INLINE /* XXX - set via configure? */
/usr/local/include/python2.5/pyport.h:#elif defined(USE_INLINE)

which means on this box things would have failed in the opposite
direction (undefined references to non-provided external functions)
without the rename.  So that's the right fix for sure.

>> It's (probably) not contributing to this particular breakage, but I
>> can't say that I think undef'ing things like _POSIX_C_SOURCE midstream
>> is a bright idea at all.  Seems to me that could easily result in
>> inconsistent results from reading different system header files.

> Ugh.

The more I think about that, the more worried I get.  It's not just
that _POSIX_C_SOURCE might be defined or not, it's that the *value*
it has affects what definitions you get.  At least that's how it
looks on my box.  So our existing code potentially allows Python.h
to redefine it with a different value than what we'd defined it as,
which could result in inconsistencies between the system headers
included by postgres.h and those included later.  I think this needs
reconsideration.  Not sure what to do about it exactly, though :-(

			regards, tom lane




view thread (9+ messages)  latest in thread

Message-ID: <25905.1349802456@sss.pgh.pa.us>
Permalink:  ../25905.1349802456@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25905.1349802456@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
  Subject: Re: pgsql: Fix thinko in previous commit
  In-Reply-To: <25905.1349802456@sss.pgh.pa.us>
  References: <E1TLKxW-0005Jx-8N@gemulon.postgresql.org> <20121009041314.GC28686@alvh.no-ip.org> <20695.1349757261@sss.pgh.pa.us> <2547.1349760458@sss.pgh.pa.us> <20121009122009.GB4214@alvh.no-ip.org> <25905.1349802456@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox