Re: plruby: rb_iterate symbol clash with libruby.so

From: Pavel Raiskup <praiskup(at)redhat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
Subject: Re: plruby: rb_iterate symbol clash with libruby.so
Date: 2018-11-07 15:27:46
Message-ID: 1930142.Hb3bbeJPGd@nb.usersys.redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, November 7, 2018 3:25:31 PM CET Tom Lane wrote:
> Pavel Raiskup <praiskup(at)redhat(dot)com> writes:
> > On Tuesday, November 6, 2018 7:28:21 PM CET Tom Lane wrote:
> >> Done. I realized that the immediate problem, rb_iterate(), was only
> >> added as of PG v10, which may explain why we hadn't heard complaints
> >> about this till now. So I've made the change only as far back as v10.
>
> > The 'rb_iterate' seems to exist at least in REL9_2_STABLE branch, so it is
> > probably much older.
>
> Oh! Hmm ... I think I jumped to conclusions when the part of my patch
> that touched struct RBTreeIterator failed to apply. But you're right,
> rb_iterate has been there since 9.0 now that I look more carefully.
> So we really ought to back-patch further. However:
>
> > That
> > said, I'm still not sure how this could work before ... Maybe it has not
> > been working for some time.
>
> Yeah, I'm now mighty confused about this as well. PL/Ruby is pretty old
> too, so how come nobody noticed this before? Is its rb_iterate call in
> someplace that hardly gets any use?

I can not authoritatively answer this (getting familiar with the code) but
many of the rb_iterate() calls were replaced with alternative API (if
available), so you might be right.

That said, I reproduced this by trigger function from tests/plt test-case
on the first try, more info and related fixes in [1]. But it is truth
that we haven't run the test-suite for RPM builds so far.

Might the reason be that nobody used plruby at all for a very long time?

[1] https://github.com/devrimgunduz/postgresql-plruby/pull/3

Pavel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-11-07 15:45:59 Re: partitioned indexes and tablespaces
Previous Message Andrew Dunstan 2018-11-07 15:27:23 Re: pread() and pwrite()