Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Umair Shahid <umair(dot)shahid(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)
Date: 2016-06-24 02:33:56
Message-ID: CAMsr+YHsCcf268HMDV-4hF=US+d5rUM4LbaZ5a=pn2nono7xLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24 June 2016 at 10:28, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:

> On Fri, Jun 24, 2016 at 11:21 AM, Craig Ringer <craig(at)2ndquadrant(dot)com>
> wrote:
> > * Launch a VS x86 command prompt
> > * devenv /debugexe bin\initdb.exe -D test
> > * Set a breakpoint in initdb.c:3557 and initdb.c:3307
> > * Run
> > * When it traps at get_restricted_token(), manually move the execution
> > pointer over the setup of the restricted execution token by dragging &
> > dropping the yellow instruction pointer arrow. Yes, really. Or, y'know,
> > comment it out and rebuild, but I was working with a supplied binary.
> > * Continue until next breakpoint
> > * Launch process explorer and find the pid of the postgres child
> process
> > * Debug->attach to process, attach to the child postgres. This doesn't
> > detach the parent, VS does multiprocess debugging.
> > * Continue execution
> > * vs will trap on the child when it crashes
>
> Do you think a crash dump could have been created by creating
> crashdumps/ in PGDATA as part of initdb before this query is run?
>

I see what you did there ;)

Yes, quite possibly, actually. I should've just got Haroon to build me a
new initdb without the priv setting and with creation of crashdumps/ .

It might be worth testing that out and adding an initdb startup flag to
create the directory, since initdb is such a PITA to debug.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-06-24 02:36:49 Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)
Previous Message Craig Ringer 2016-06-24 02:30:19 Re: initdb issue on 64-bit Windows - (Was: [pgsql-packagers] PG 9.6beta2 tarballs are ready)