Re: protect dll lib initialisation against any exception, for 8.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: protect dll lib initialisation against any exception, for 8.5
Date: 2009-04-02 05:09:23
Message-ID: 9954.1238648963@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <greg(dot)stark(at)enterprisedb(dot)com> writes:
> Hmm. One case where this logic might not be true would be if the dll
> relies on c++ style static initializers and destructors. In that case
> it may very well leave hooks in place in case of an error and only
> clean them up when you call dlclose().

Interesting point, but considering that we don't support or encourage
use of C++ anyway, it shouldn't carry much weight in our estimate
of how an init function is likely to behave.

Also, wouldn't C++ initializers most likely get called by the dynamic
loader itself, not during the PG_init function?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tino Wildenhain 2009-04-02 06:22:32 Re: [GENERAL] string_to_array with empty input
Previous Message Tom Lane 2009-04-02 05:05:30 Re: protect dll lib initialisation against any exception, for 8.5