Re: hung backends stuck in spinlock heavy endless loop - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: hung backends stuck in spinlock heavy endless loop
Date
Msg-id CAM3SWZRQejktzx+YFb-V5rVCXfegM56vS7ar1KBvTdOyUH1FMQ@mail.gmail.com
Whole thread Raw
In response to Re: hung backends stuck in spinlock heavy endless loop  (Peter Geoghegan <pg@heroku.com>)
Responses Re: hung backends stuck in spinlock heavy endless loop
List pgsql-hackers
On Wed, Jan 14, 2015 at 12:24 PM, Peter Geoghegan <pg@heroku.com> wrote:
> Could you write some code to print out the block number (i.e.
> "BlockNumber blkno") if there are more than, say, 5 retries within
> _bt_moveright()?

Obviously I mean that the block number should be printed, no matter
whether or not the P_INCOMPLETE_SPLIT() path is taken or not. So you
should just move this to the top of the for(;;) loop, so it's always
available to print:

BlockNumber blkno = BufferGetBlockNumber(buf);

Thanks
-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: hung backends stuck in spinlock heavy endless loop
Next
From: Robert Haas
Date:
Subject: Re: __attribute__ for non-gcc compilers