Re: Allow some recovery parameters to be changed with reload

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: Fujii Masao <masao.fujii@oss.nttdata.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "a.lubennikova@postgrespro.ru" <a.lubennikova@postgrespro.ru>
Cc: "robertmhaas@gmail.com" <robertmhaas@gmail.com>, "michael@paquier.xyz" <michael@paquier.xyz>, "andres@anarazel.de" <andres@anarazel.de>, "peter.eisentraut@2ndquadrant.com" <peter.eisentraut@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-11-06T21:36:33Z
Lists: pgsql-hackers
Hello

> I'm wondering if it's safe to allow restore_command to be emptied during
> archive recovery. Even when it's emptied, archive recovery can proceed
> by reading WAL files from pg_wal directory. This is the same behavior as
> when restore_command is set to, e.g., /bin/false.

I am always confused by this implementation detail. restore_command fails? Fine, let's just read file from pg_wal. But this is different topic...

I do not know the history of this fatal ereport. It looks like "must specify restore_command when standby mode is not enabled" check is only intended to protect the user from misconfiguration and the rest code will treat empty restore_command correctly, just like /bin/false. Did not notice anything around StandbyMode conditions.

regards, Sergei



Commits

  1. Allow restore_command parameter to be changed with reload.

  2. Stamp 13.0.

  3. Allow some recovery parameters to be changed with reload