Re: Improve handling of parameter differences in physical replication

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Sergei Kornilov <sk@zsrv.org>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Álvaro Herrera <alvherre@2ndquadrant.com>
Date: 2020-11-20T13:14:44Z
Lists: pgsql-hackers

Attachments

On 2020-11-19 20:17, Sergei Kornilov wrote:
> Seems WAIT_EVENT_RECOVERY_PAUSE addition was lost during patch simplification.

added

>> 		ereport(FATAL,
>> 				(errmsg("recovery aborted because of insufficient parameter settings"),
>> 				 errhint("You can restart the server after making the necessary configuration changes.")));
> 
> I think we should repeat here conflicted param_name and minValue. pg_wal_replay_resume can be called days after recovery being paused. The initial message can be difficult to find.

done

> 
>> errmsg("recovery will be paused")
> 
> May be use the same "recovery has paused" as in recoveryPausesHere? It doesn't seem to make any difference since we set pause right after that, but there will be a little less work translators.

done

> Not sure about "If recovery is unpaused". The word "resumed" seems to have been usually used in docs.

I think I like "unpaused" better here, because "resumed" would seem to 
imply that recovery can actually continue.

One thing that has not been added to my patch is the equivalent of 
496ee647ecd2917369ffcf1eaa0b2cdca07c8730, which allows promotion while 
recovery is paused.  I'm not sure that would be necessary, and it 
doesn't look easy to add either.

-- 
Peter Eisentraut
2ndQuadrant, an EDB company
https://www.2ndquadrant.com/

Commits

  1. Pause recovery for insufficient parameter settings

  2. Replace a macro by a function

  3. Improve handling of parameter differences in physical replication

  4. Prefer standby promotion over recovery pause.