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: Dave Page <dpage(at)pgadmin(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Re: Proposed Windows-specific change: Enable crash dumps (like core files)
Date: 2010-12-17 07:46:56
Message-ID: AANLkTi=7=FfvHg97QkNMeH0H1TEet1mM5Cw6zgo3CGzt@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Dec 17, 2010 8:02 AM, "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au> wrote:
>
> On 16/12/10 21:01, Magnus Hagander wrote:
>
> > Found another problem in it: when running with an older version of
> > dbghelp.dll (which I was), it simply didn't work. We need to grab the
> > version of dbghelp.dll at runtime and pick which things we're going to
> > dump based on that.
>
> I was about to suggest dropping the fallback loading of the system
> dbghelp.dll, and just bundle a suitable version with Pg, then I saw how
> big the DLL is. It's 800kb (!!) of code that'll hopefully never get used
> on any given system. With a footprint like that, bundling it seems
> rather less attractive.
>
> I think Magnus is right: test the dbghelp.dll version and fall back to
> supported features - as far back as XP, anyway; who cares about anything
> earlier than that. An updated version can always be put in place by the
> user if the built-in one can't produce enough detail.

Did you get a chance to test that it still produced a full dump on your
system?

> > We use the existance of the "crashdumps" directory as an indication we
> > want crashdumps. That's fine when the system is up. But what if we
> > crash *in the postmaster before we have done chdir()*?
> >
> > Should we perhaps instead define a subdirectory of *where the .EXE
> > file is*, and dump the file there?

...

> Is this going to be a real-world issue?

Nah, I'm with tom on the fact that this is probably not.

> > It needs to be documented somewhere.Perhaps in "15.8 Platform Specific
> > Notes"? That's really about building it, but it might be reasonable
> > there anyway? It does hold a number of things today that aren't
> > related to building, for other platforms.
>
> Seems reasonable.

I'll put something together there then.

/Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message fanng yuan 2010-12-17 09:18:21 about error handling mechanism
Previous Message Simon Riggs 2010-12-17 07:05:05 Re: ALTER TABLE ... REPLACE WITH