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

Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>

From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Aidan Van Dyk <aidan@highrise.ca>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-03-25T12:48:27Z
Lists: pgsql-hackers
Fujii Masao wrote:
>> sources &= ~failedSources;
>> failedSources |= readSource;
> 
> The above lines in XLogPageRead() seem not to be required in normal
> recovery case (i.e., standby_mode = off). So how about the attached
> patch?
>
> *** 9050,9056 **** next_record_is_invalid:
> --- 9047,9056 ----
>   	readSource = 0;
>   
>   	if (StandbyMode)
> + 	{
> + 		failedSources |= readSource;
>   		goto retry;
> + 	}
>   	else
>   		return false;

That doesn't work because readSource is cleared above. But yeah,
failedSources is not needed in archive recovery, so that line can be
removed.

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