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

Re: recovery getting interrupted is not so unusual as it used to be

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: recovery getting interrupted is not so unusual as it used to be
Date: 2010-05-17 08:33:44
Message-ID: AANLkTikDWGNN6ilyVwTYt-ODKleasyOdcFssIlE-MSWp@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Sat, May 15, 2010 at 3:20 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Hmm, OK, I think that makes sense.  Would you care to propose a patch?

Yep. Here is the patch.

This patch distinguishes normal shutdown from unexpected exit, while the
server is in recovery. That is, when smart or fast shutdown is requested
during recovery, the bgwriter sets the ControlFile->state to new-introduced
DB_SHUTDOWNED_IN_RECOVERY state.

When recovery starts from the DB_SHUTDOWNED_IN_RECOVERY state, the startup
process emits

    LOG:  database system was shut down in recovery at 2010-05-12 20:35:24 EDT

instead of

    LOG:  database system was interrupted while in recovery at log
time 2010-05-12 20:35:24 EDT
    HINT:  If this has occurred more than once some data might be
corrupted and you might need to choose an earlier recovery target.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment: db_state_for_shutdown_in_recovery_v1.patch
Description: application/octet-stream (2.2 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2010-05-17 08:40:50
Subject: Re: Keepalive for max_standby_delay
Previous:From: Fujii MasaoDate: 2010-05-17 07:38:04
Subject: Re: Stefan's bug (was: max_standby_delay considered harmful)

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