Boszormenyi Zoltan írta:
Korry Douglas írta:
I have the $SUBJECT problem loading my own
module in PostgreSQL. The server is HP-UX/ia64,
PostgeSQL 8.4.2 was compiled with HP CC.
pl/PgSQL can be loaded fine.

...:/usr/local/pgsql/pgsql-cc-8.4/lib# ldd => /usr/local/pgsql/runtime/lib/ => /usr/lib/hpux64/ => /usr/lib/hpux64/ => /usr/lib/hpux64/

"/usr/local/pgsql/runtime" is a link to "/usr/local/pgsql/pgsql-cc-8.4"

...:/usr/local/pgsql/pgsql-cc-8.4/lib# file ELF-64 shared object file - IA64 ELF-64 shared object file - IA64

The module compilation was done using "USE_PGXS=1 gmake".

How can I solve this issue?
IIRC, HP/UX doesn't like to dynamic-load shared libraries that use
thread-local storage. Your shared library ( is linked
against so you may be running into that problem. I
would recommend running the HP/UX equivalent of strace to capture more
information about the call to dlopen() (or perhaps shl_load(),
depending on which version of HP/UX you are using).
Yes, it seems you are right, I have read dlopen(3) in full on HP-UX,
this small detail is documented there. It seems I need to preload
the libraries:, and all the needed libs from
the target ODBC driver... Thanks for the info.
Actually, I experimented with a "threaded" PostgreSQL server,
I added LDFLAGS="-lpthreads" to the PG configure options
and suddenly my module that's linked to libraries also linked
with started working. The dlopen(3) man page
doesn't say this as a working constellation.

Best regards,
Zoltán Böszörményi

Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
postedFeb 9, '10 at 10:06p
activeFeb 9, '10 at 10:06p

1 user in discussion

Boszormenyi Zoltan: 1 post



site design / logo © 2022 Grokbase