Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKPkJ-0007bM-UW for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Nov 2018 15:27:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gKPkI-0000X4-En for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Nov 2018 15:27:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKPkI-0000Nb-1h for pgsql-hackers@lists.postgresql.org; Wed, 07 Nov 2018 15:27:54 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gKPkE-0003nx-Fi for pgsql-hackers@postgresql.org; Wed, 07 Nov 2018 15:27:52 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8303958E42; Wed, 7 Nov 2018 15:27:49 +0000 (UTC) Received: from nb.usersys.redhat.com (unknown [10.43.2.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 75FA960BEE; Wed, 7 Nov 2018 15:27:48 +0000 (UTC) From: Pavel Raiskup To: Tom Lane Cc: Robert Haas , "pgsql-hackers@postgresql.org" , Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= Subject: Re: plruby: rb_iterate symbol clash with libruby.so Date: Wed, 07 Nov 2018 16:27:46 +0100 Message-ID: <1930142.Hb3bbeJPGd@nb.usersys.redhat.com> In-Reply-To: <25954.1541600731@sss.pgh.pa.us> References: <4738198.8KVIIDhgEB@nb.usersys.redhat.com> <5127122.UsUPqPCgps@nb.usersys.redhat.com> <25954.1541600731@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 07 Nov 2018 15:27:49 +0000 (UTC) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wednesday, November 7, 2018 3:25:31 PM CET Tom Lane wrote: > Pavel Raiskup 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