From: Andres Freund <andres@2ndquadrant.com>
To: pgsql-bugs@postgresql.org
Cc: Maxim Boguk <maxim.boguk@gmail.com>
Subject: Re: BUG #7500: hot-standby replica crash after an initial rsync
Date: Tue, 21 Aug 2012 22:08:05 +0200
Message-ID: <201208212208.06042.andres@2ndquadrant.com> (raw)
In-Reply-To: <CAK-MWwTNY3Z4hDS=JoUZSLwaPgw2Udu6acPAN40u72rFP5+SZw@mail.gmail.com>
References: <E1T3jVT-0006ug-Rs@wrigleys.postgresql.org>
<201208211458.34085.andres@2ndquadrant.com>
<CAK-MWwTNY3Z4hDS=JoUZSLwaPgw2Udu6acPAN40u72rFP5+SZw@mail.gmail.com>
On Tuesday, August 21, 2012 03:30:44 PM Maxim Boguk wrote:
> Hi Andres,
>
> > > I have some problems with debug startup process with gdb...
> >
> > > I following next sequence of commands (and got no useful results):
> > Youre debugging the postmaster that way. The easiest way would be to just
> > attach to the startup process with gdb -p. Not sure if you can manage
> > that timingwise without manually adding sleeps.
>
> It's imposible without added sleep seems. Too fast for me.
> Where I should add sleep call in PostgreSQL source? (process managment part
> of PostgreSQL isn't known for me at all).
I would suggest adding it to StartupXLOG() in xlog.c just before the /* REDO
*/ comment or similar.
I would add something akin to
elog(WARNING, "pid of startup is: %d, sleeping for 10s", getpid());
sleep(10);
Greetings,
Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andres@2ndquadrant.com, maxim.boguk@gmail.com
Subject: Re: BUG #7500: hot-standby replica crash after an initial rsync
In-Reply-To: <201208212208.06042.andres@2ndquadrant.com>
References: <E1T3jVT-0006ug-Rs@wrigleys.postgresql.org> <201208211458.34085.andres@2ndquadrant.com> <CAK-MWwTNY3Z4hDS=JoUZSLwaPgw2Udu6acPAN40u72rFP5+SZw@mail.gmail.com> <201208212208.06042.andres@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox