Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Date: 2010-11-23 21:18:23
Message-ID: AANLkTinwQRDR-=R=xMP_vfNghO-Q4fMNzWr8BLq9ye4e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 23, 2010 at 15:09, Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> wrote:
> On 11/23/2010 01:46 AM, Tom Lane wrote:
>
>>> * However, when storing it in crashdumps, I think the code would need
>>> to create that directory if it does not exist, doesn't it?
>>
>> If it didn't do so, then manual creation/removal of the directory could
>> be used as an on/off switch for the feature.
>
> Yep. That's how I'd want to do it in 9.1 - test for the directory and use
> that to decide whether to set the handler during early backend startup. That
> way you don't need a GUC, and should be able to load it *very* early in
> backend startup.

Or you set the handler always, and have the handler only actually
create the dump if the directory exists. That way you can add the
directory and still get a dump from both existing backends and the
postmaster itself without a restart.

> The crash dump facility in dbghelp.dll offers *optional* features where apps
> can stream in additional app-specific data like recent log excerpts, etc. I
> didn't try to implement anything like that in the initial module partly
> because I want to minimize the amount of the backend that must be working
> for a crash dump to succeed.

Yeah, we already have the logs in the logfile etc. Let's keep this
uncomplicated so that it stays working :-)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-11-23 21:42:01 Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Previous Message Magnus Hagander 2010-11-23 21:16:37 Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)