Re: PG signal handler and non-reentrant malloc/free calls

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Nikhil Sontakke <nikhil(dot)sontakke(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG signal handler and non-reentrant malloc/free calls
Date: 2011-02-28 16:13:34
Message-ID: 8128.1298909614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> Unless ImmediateInterruptOK is set, but it's only set around a few
> blocking system calls where it is safe to do so. (Checks...) Actually,
> md5_crypt_verify() looks suspicious, it does "ImmediateInterruptOK =
> true", and then calls palloc() and pfree().

Hm, yeah, and ClientAuthentication() seems way too optimistic about what
it does with that set too. I'm not sure what we can do about it though.
The general shape of the problem here is that we're about to go off into
uncooperative third-party libraries like krb5, so if we don't enable
interrupts we're going to have problems honoring authentication timeout.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2011-02-28 16:17:52 Re: Problem with pg_upgrade (8.4 -> 9.0) due to ALTER DATABASE SET ROLE
Previous Message Tom Lane 2011-02-28 15:51:12 Re: Native XML