plruby: rb_iterate symbol clash with libruby.so
Pavel Raiskup <praiskup@redhat.com>
From: Pavel Raiskup <praiskup@redhat.com>
To: PostgreSQL Hacker <pgsql-hackers@postgresql.org>
Cc: devrim@gunduz.org
Date: 2018-11-03T16:19:40Z
Lists: pgsql-hackers
Hi, I'm curious how it worked before (seems like the function is defined
in both PostgreSQL and Ruby projects for quite some time) - but I recently
came across this situation:
- /bin/postgres is build-time linked with 'ld -E'
- /bin/postgres dlopen()s plruby.so
- plruby.so calls rb_iterate, but linker prefers rb_iterate defined in
/bin/postgres, instead of (the wanted one) rb_iterate from libruby.so
This means an ugly PG server crash. I'm curious what to do with this;
ideally it would be solvable from plruby.so itself, but there doesn't seem
to be nice solution (one could do some hacks with dlopen('libruby.so')).
Is it realistic we could rename red-black tree methods from 'rb_*' to e.g.
'rbt_*' to avoid this clash?
Pavel
Commits
-
Rename rbtree.c functions to use "rbt" prefix not "rb" prefix.
- b2e754c14e27 10.7 landed
- 1f28ec6be270 11.1 landed
- 003c68a3b45d 12.0 landed