Re: Archive recovery won't be completed on some situation. - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Archive recovery won't be completed on some situation.
Date
Msg-id 5322DD0D.6030409@vmware.com
Whole thread Raw
In response to Archive recovery won't be completed on some situation.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: Archive recovery won't be completed on some situation.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On 03/14/2014 12:32 PM, Kyotaro HORIGUCHI wrote:
> Restarting server with archive recovery fails as following just
> after it was killed with SIGKILL after pg_start_backup and some
> wal writes but before pg_stop_backup.
>
> | FATAL:  WAL ends before end of online backup
> | HINT: Online backup started with pg_start_backup() must be
> |  ended with pg_stop_backup(), and all WAL up to that point must
> |  be available at recovery.
>
> What the mess is once entering this situation, I could find no
> formal operation to exit from it.
>
> On this situation, 'Backup start location' in controldata has
> some valid location but corresponding 'end of backup' WAL record
> won't come forever.
>
> But I think PG cannot tell the situation dintinctly whether the
> 'end of backup' reocred is not exists at all or it will come
> later especially when the server starts as a streaming
> replication hot-standby.

If you kill the server while a backup is in progress, the backup is 
broken. It's correct that the server refuses to start up from the broken 
backup. So basically, don't do that.

- Heikki



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Next
From: Marko Tiikkaja
Date:
Subject: Re: plpgsql.warn_shadow