Re: Improve handling of parameter differences in physical replication

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, 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-19T19:17:34Z
Lists: pgsql-hackers
Hello

Thank you! I'm on vacation, so I was finally able to review the patch.

Seems WAIT_EVENT_RECOVERY_PAUSE addition was lost during patch simplification.

> 		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.

> 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.

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

regards, Sergei



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.