Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files) - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Date
Msg-id AANLkTinBKtSzsOzwAZUvkJdu=onds5c9hupvkCt-wTg0@mail.gmail.com
Whole thread Raw
In response to Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Dec 16, 2010 at 15:56, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Thu, Dec 16, 2010 at 9:24 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>> We can do such a commandline. We don't have any platform-specific
>>> commandline options today. Is that something we've intentionally
>>> avoided, or just not needed before?
>
>> Beats me.
>
> Yes, it's something we intentionally avoid: there is no convenient way
> to have conditional entries in getopt()'s option-letters string.
>
> I think the proposal for such a switch is unnecessary lily-gilding,
> and is far more likely to create problems than solve any.  Please
> remember that a debugging facility has got to be minimal impact,
> or it creates its own Heisenbugs.
>
> (In the unlikely event that someone needed to debug such an early crash,
> surely they could just create a crashdump subdirectory in whatever
> directory they want to launch the postmaster from.)

Or actually - run the postmaster from a debugger...

I think the thing we lose is the ability for the DBA to say
pre-emptively "if this crashes tomorrow on restart i want a
crashdump".

Hmm. What we could do is have pg_ctl chdir() into the data directory
on start. We don't set it to anything there now - so we rely on the
"If this parameter is NULL, the new process will have the same current
drive and directory as the calling process." Is that likely to cause
problems in other areas?

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Next
From: Bruce Momjian
Date:
Subject: Re: Crash on attempt to connect to nonstarted server