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

From: Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 04:24:26
Message-ID: 63ACBEDD-3CF7-494C-940C-448B9263DFD2@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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().

--
Greg

On 1 Apr 2009, at 22:58, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2009/4/2 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>>> So I'm thinking this is really unnecessary and we should leave well
>>> enough alone.
>
>> I see it. I thing , an safety of this exception should be solved only
>> by programmer. It's important to release all hooks, and then raise an
>> exception. It is in developer responsibility.
>
> Well, if the init function is sufficiently carefully coded to back out
> just the changes it's managed to apply, then good for it. But we
> still
> aren't losing much by leaving dfmgr as-is.
>
> regards, tom lane
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2009-04-02 04:46:26 Re: protect dll lib initialisation against any exception, for 8.5
Previous Message maosen.zhang 2009-04-02 04:00:08 hstore bug and repair method