Re: atexit_callback can be a net negative

From: Florian Weimer <fweimer(at)redhat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: atexit_callback can be a net negative
Date: 2014-03-07 15:13:32
Message-ID: 5319E21C.5030309@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/07/2014 04:10 PM, Tom Lane wrote:
> Florian Weimer <fweimer(at)redhat(dot)com> writes:
>> On 03/07/2014 03:57 PM, Tom Lane wrote:
>>> It's not a reason not to do something about the much larger chance of
>>> this happening in a direct child process, which certainly won't have a
>>> matching PID.
>
>> Indeed. Checking getppid() in addition might narrow things down further.
>
> I don't think getppid adds much to the party. In particular, what to
> do if it returns 1? You can't tell if you're an orphaned backend (in
> which case you should still do normal shutdown)

Oh. I didn't know that orphaned backends perform a normal shutdown.

--
Florian Weimer / Red Hat Product Security Team

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-03-07 15:24:31 Re: atexit_callback can be a net negative
Previous Message Tom Lane 2014-03-07 15:10:18 Re: atexit_callback can be a net negative