Re: [v9.1] sepgsql - userspace access vector cache

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>, Kohei Kaigai <Kohei(dot)Kaigai(at)emea(dot)nec(dot)com>, Yeb Havinga <yebhavinga(at)gmail(dot)com>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.1] sepgsql - userspace access vector cache
Date: 2011-08-19 14:06:55
Message-ID: CA+TgmoZTPbR852n6YzgAq99139_YKwcEFzyJay03q+VWx-wg9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 19, 2011 at 9:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> writes:
>> 2011/8/18 Robert Haas <robertmhaas(at)gmail(dot)com>:
>>> Actually, as I look at this more, I think this build system is
>>> completely mis-designed.  Given that you want to build sepgsql,
>>> selinux is not an optional feature.  So the stuff in
>>> contrib/sepgsql/Makefile that is intended to link against libselinux
>>> only if --with-selinux was specified at configure time is nonsense.
>
> What stuff is that?

SHLIB_LINK += $(filter -lselinux, $(LIBS))

> This patch seems unnecessary to me.  The way it works now appears to be
> quite parallel to the way that contrib/xml2 works, and has worked for
> years.  I don't think that sepgsql should behave differently from that.

Hmm. I see now that it's parallel, but I find it pretty confusing
that building sepgsql without specifying --with-selinux results in a
shared library that seems to compile OK but won't load. Why not
just:

SHLIB_LINK = -lselinux

Similarly, in the case of xml2 we have:

SHLIB_LINK += $(filter -lxslt, $(LIBS)) $(filter -lxml2, $(LIBS))

For xslt, it probably makes sense to filter it out if it wasn't found,
because the code has ifdefs for USE_XSLT that do something sensible if
the library is not there. But I fail to see what the point is of
filtering out xml2, because surely we're doomed if that's not there...
or am I confused?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-08-19 14:17:04 Re: the big picture for index-only scans
Previous Message Tom Lane 2011-08-19 13:59:45 Re: [v9.1] sepgsql - userspace access vector cache