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

From: Haroon <muhammad(dot)haroon(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, 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 07:01:24
Message-ID: CAD=LzWFDqvPNOtut--ZUkK5BLZtx=VNBqKY+bMX4eVG70Pwk-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 24, 2016 at 11:21 AM, Craig Ringer
<craig(at)2ndquadrant(dot)com> wrote:

>> I was helping Haroon with this last night. I don't have access to the
>> original thread and he's not around so I don't know how much he said.
I'll
>> repeat our findings here.

Craig, I am around now looking into this. I'll update the list as I get
more info.

- Haroon

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

> On Fri, Jun 24, 2016 at 3:22 PM, Craig Ringer <craig(at)2ndquadrant(dot)com>
> wrote:
> >
> >
> > 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?
> >
> >
> >
> > The answer is "yes" btw. Add "crashdumps" to the static array of
> directories
> > created by initdb and it works great.
>
> As simple as attached..
>
> > Sigh. It'd be less annoying if I hadn't written most of the original
> patch.
>
> You mean the patch that created the crashdumps/ trick? This has saved
> me a couple of months back to analyze a problem TBH.
> --
> Michael
>

--
Haroon http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-06-24 07:09:56 Re: PQconnectdbParams vs PQconninfoParse
Previous Message Ashutosh Bapat 2016-06-24 06:44:25 Re: Postgres_fdw join pushdown - wrong results with whole-row reference