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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
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:20:46
Message-ID: 6868.1313763646@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Aug 19, 2011 at 9:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> This patch seems unnecessary to me.

> 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.

Well, that's a fair point, but the same happens in contrib/xml2 (if you
have a setup that doesn't need a special -I switch, or you provide that
some other way), and nobody has ever complained about it.

> Why not just:

> SHLIB_LINK = -lselinux

I wouldn't have any particular objection to that (although I think it's
supposed to be += here). I don't see that any of the other changes
Kaigai proposed are helpful, though.

> 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?

Hmm. I think it's just that way to make the code look parallel for both
libraries. But I can see potential value in making -lxml2 unconditional
--- as you say, that would result in a link failure instead of a
silently broken library.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

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