Re: atexit_callback can be a net negative

From: Claudio Freire <klaussfreire(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-Dev <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: atexit_callback can be a net negative
Date: 2014-03-07 05:17:03
Message-ID: CAGTBQpafkhr3n0B90W8VROXKRvFHjLMbsxOZwOpLEGV_DU_TtA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 7, 2014 at 2:03 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> In the bug thread I proposed making atexit_callback check whether getpid()
> still matches MyProcPid. If it doesn't, then presumably we inherited the
> atexit callback list, along with the value of MyProcPid, from some parent
> backend process whose elbow we should not joggle. Can anyone see a flaw
> in that?

While my answer would be "not really" (lots of python libraries do the
same to handle forks), there's an optional path: pthread_atfork.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-03-07 05:17:47 Re: Securing "make check" (CVE-2014-0067)
Previous Message Tom Lane 2014-03-07 05:03:48 atexit_callback can be a net negative