Re: Question about debugging bootstrapping and catalog entries - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Question about debugging bootstrapping and catalog entries
Date
Msg-id 20061218114515.GB5720@svana.org
Whole thread Raw
In response to Question about debugging bootstrapping and catalog entries  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Question about debugging bootstrapping and catalog entries
Re: Question about debugging bootstrapping and catalog entries
Re: Question about debugging bootstrapping and catalog entries
List pgsql-hackers
On Mon, Dec 18, 2006 at 11:35:44AM +0000, Gregory Stark wrote:
> Are there any tricks people have for debugging bootstrapping processing? I
> just need to know what index it's trying to build here and that should be
> enough to point me in the right direction:

Here's what I did: you can step over functions in initdb until it fails
(although I alredy know which part it's failing I guess). Restart. Then
you go into that function and step until the new backend has been
started. At this point you attach another gdb to the backend and let it
run.

Some steps create multiple backends, a printf() statement sometime help
determining where to stop.

If the backend process segfaults, the easiest is to enable core dumps,
then you can run gdb on the left-overs, so to speak.

If you get an error, you put a breakpoint on errfinish(). Note, that
gets called even on messages you don't normally see, so you may have to
skip a couple to get the real message.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Question about debugging bootstrapping and catalog entries
Next
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: Question about debugging bootstrapping and catalog entries