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

Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date: 2010-03-19 13:44:53
Message-ID: 4BA37FD5.9000404@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-docspgsql-hackers
Alvaro Herrera wrote:
> Heikki Linnakangas escribió:
> 
>> When recovery reaches an invalid WAL record, typically caused by a
>> half-written WAL file, it closes the file and moves to the next source.
>> If an error is found in a file restored from archive or in a portion
>> just streamed from master, however, a PANIC is thrown, because it's not
>> expected to have errors in the archive or in the master.
> 
> Hmm, I think I've heard that tools like walmgr do incremental copies of
> the current WAL segment to the archive.  Doesn't this change break that?

Hmm, you could have a restore_command that checks the size before
restoring to make it still work. I note that pg_standby does that, but
of course you can't use pg_standby with the built-in standby mode. Or
maybe we should modify the built-in standby mode to handle partial files
coming from restore_command by not throwing an error but recovering to
the end of the partial file, and then retrying restore_command again
with the same filename until the whole file is recovered (or the missing
WAL is received through other means, ie. streaming replication).

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-docs by date

Next:From: Fujii MasaoDate: 2010-03-23 07:17:53
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Previous:From: Alvaro HerreraDate: 2010-03-19 13:28:48
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

pgsql-hackers by date

Next:From: Simon RiggsDate: 2010-03-19 15:32:29
Subject: Re: [COMMITTERS] pgsql: Reset btpo.xact following recovery of btree delete page.
Previous:From: Alvaro HerreraDate: 2010-03-19 13:28:48
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

pgsql-committers by date

Next:From: Simon RiggsDate: 2010-03-19 15:32:29
Subject: Re: [COMMITTERS] pgsql: Reset btpo.xact following recovery of btree delete page.
Previous:From: Alvaro HerreraDate: 2010-03-19 13:28:48
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

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