Re: plruby: rb_iterate symbol clash with libruby.so

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: plruby: rb_iterate symbol clash with libruby.so
Дата
Msg-id 20181103184259.w5g2quh7fevuny23@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: plruby: rb_iterate symbol clash with libruby.so  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: plruby: rb_iterate symbol clash with libruby.so  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2018-11-03 14:39:45 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> >> Pavel Raiskup <praiskup@redhat.com> writes:
> >>> Is it realistic we could rename red-black tree methods from 'rb_*' to e.g.
> >>> 'rbt_*' to avoid this clash?
> 
> > ISTM this specific case we could solve the issue by opening plruby.so /
> > extension sos with RTLD_DEEPBIND.  That doesn't work if ruby extensions
> > that are loaded later use rb_iterate, but should work for the case above.
> 
> Doesn't work on non-glibc platforms, though.

Yea, but I'm not sure there's anything portable to do about such cases :/

> > On 2018-11-03 14:19:46 -0400, Tom Lane wrote:
> >> That's not terribly appetizing, because it essentially means we're giving
> >> Ruby (and potentially every other library on the planet) veto power over
> >> our function namespace.  That does not scale, especially not when the
> >> feedback loop has a time constant measured in years :-(
> >> I don't have a huge objection to renaming the rbtree functions, other
> >> than the precedent it sets ...
> 
> > I don't mind the precedent that much, but isn't that also not unlikely
> > to break other extensions that use those functions?
> 
> I rather doubt there are any.  Also, if there are, the RTLD_DEEPBIND
> solution would break them too, no?

Why would it break? Deepbind just means the to-be-opened .so is put
first in the search path, if there's no match it'll still look in other
sos.

Greetings,

Andres Freund


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plruby: rb_iterate symbol clash with libruby.so
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: partitioned indexes and tablespaces