Skip site navigation (1) Skip section navigation (2)

Re: BUG #7500: hot-standby replica crash after an initial rsync

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
Subject: Re: BUG #7500: hot-standby replica crash after an initial rsync
Date: 2012-08-21 20:08:05
Message-ID: 201208212208.06042.andres@2ndquadrant.com (view raw or flat)
Thread:
Lists: pgsql-bugs
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


In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2012-08-21 20:30:34
Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram
Previous:From: Alvaro HerreraDate: 2012-08-21 19:17:10
Subject: Re: BUG #4958: Stats collector hung on WaitForMultipleObjectsEx while attempting to recv a datagram

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group