OS X loader failure (was Re: Beta2 - A Late Announcement) - Mailing list pgsql-general

From Tom Lane
Subject OS X loader failure (was Re: Beta2 - A Late Announcement)
Date
Msg-id 18795.1033449310@sss.pgh.pa.us
Whole thread Raw
In response to Re: Beta2 - A Late Announcement  (Adam Witney <awitney@sghms.ac.uk>)
List pgsql-general
Adam Witney <awitney@sghms.ac.uk> writes:
> [ bad shared library causes backend coredump on OS X ]

This patch seems to suppress the coredump:

http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/port/dynloader/darwin.c.diff?r1=1.5&r2=1.6

However, instead of a somewhat-useful error message on postmaster
stderr, you now get only "no message available".  This sucks :-(.
Apparently, asking not to crash overrides the default error handler
that prints the useful error message before crashing.

I applied the patch anyway, since a backend crash is considerably more
Not Acceptable than not telling you why the shlib can't be loaded.
But getting the error message too would be much better.  Apparently,
if we want the message too, we have to create a 'linkEdit' hook to print
it --- see
http://developer.apple.com/techpubs/macosx/DeveloperTools/MachORuntime/5rt_api_reference/_Object_Fil_e_Functions.html
for some pointers.

Any OSX users care to code up the error-printing routine?

            regards, tom lane

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: composite types in 7.3
Next
From: Yury Bokhoncovich
Date:
Subject: Re: 7.0 -> 7.2 Migration (oops)