Re: [Skytools-users] WAL Shipping + checkpoint

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Martin Pihlak <martin(dot)pihlak(at)gmail(dot)com>
Cc: Sébastien Lardière <slardiere(at)hi-media(dot)com>, pgsql-general(at)postgresql(dot)org, skytools-users(at)pgfoundry(dot)org
Subject: Re: [Skytools-users] WAL Shipping + checkpoint
Date: 2009-08-28 15:13:45
Message-ID: 1251472425.4839.1388.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Fri, 2009-08-28 at 17:55 +0300, Martin Pihlak wrote:

> This is weird, indeed it seems that for some reason the recovery restartpoints
> are not created.
>
> Looking quickly at RecoveryRestartPoint() in xlog.c, there are two cases when it
> doesn't do a checkpoint. For one thing, it checks if if enough time has elapsed
> since last controlfile modification. If not, the checkpoint is skipped. I'm wondering
> if it does the correct thing if the clocks of two machines are too far apart.

Probably not that.

> Another check is "is it safe to do a checkpoint". This is logged with DEBUG2, so
> it should be visible if you set the logging level accordingly.

This seems like the most likely cause. I would guess that one of your
GiST indexes has a corruption in it and is preventing a restartpoint
from taking place. That has happened previously.

> Alternatively, you could attach a debugger to the recovery process and see if the
> RecoveryRestartPoint() and CheckPointGuts() functions are called at all.

I would say no need for that, but you can check the Gist pending actions
table.

--
Simon Riggs www.2ndQuadrant.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Gainty 2009-08-28 15:22:26 Re: Anybody know where to find Dan Langille?
Previous Message Karl Nack 2009-08-28 15:08:37 Work Scheduling DB Design