Re: bug in SignalSomeChildren

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Eric Ridge <eebbrr(at)gmail(dot)com>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: bug in SignalSomeChildren
Date: 2010-12-21 19:33:41
Message-ID: AANLkTimZDD9jE3SkgYRMYrhfTE=0LTewp9KsVQw==Cr6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 21, 2010 at 1:45 PM, Eric Ridge <eebbrr(at)gmail(dot)com> wrote:
> On Mon, Dec 20, 2010 at 3:36 PM, Martijn van Oosterhout
> <kleptog(at)svana(dot)org> wrote:
>> On Mon, Dec 20, 2010 at 03:08:02PM -0500, Robert Haas wrote:
>>> The attached patch appears to work correctly on MacOS X.  I did check,
>>> BTW: getppid() in the attached process returns gdb's pid.  Poor!
>>
>> This appears to be a BSDism at least. On Linux and BSD derivatives the
>> man pages specifically mention the reparenting (needed for catching
>> signals) but on Linux getppid() is specifically documented to return
>> the correct value anyway.
>
> I'm just a random lurker here, and happened to catch the last bit of
> this thread.  Could one of you that understand this issue straighten
> something out for me?
>
> Every now and again we've been known to attach gdb to a production
> Postgres backend to troubleshoot problems.  Ya know, just trying to
> get an idea of what Postgres is actually doing via a backtrace.  This
> is always on Linux, BTW.
>
> Does this thread mean that the above no longer works with v9?  Or is
> this only on non-Linux systems, or did the patch Robert Haas commit
> "fix" fix?  We're still using 8.1 (slowly moving to 8.4) in
> production, but have plans of picking up 9.x later in '11.  Just
> wondering if we need to actually be a bit more careful in the future?

The point of the patch was to improve cases where attaching gdb
*didn't* work well. Any cases where it was already working for you
aren't going to be made worse by this.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-12-21 19:35:03 Re: The cost of visibillity testing? (gin-search)
Previous Message Simon Riggs 2010-12-21 19:33:04 Re: SQL/MED - core functionality