Re: Allow some recovery parameters to be changed with reload

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Sergei Kornilov <sk@zsrv.org>, Andres Freund <andres@anarazel.de>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-08-09T05:21:49Z
Lists: pgsql-hackers
On Wed, Aug 05, 2020 at 11:41:49AM -0400, Robert Haas wrote:
> On Sat, Mar 28, 2020 at 7:21 AM Sergei Kornilov <sk@zsrv.org> wrote:
>> So...
>> We call restore_command only when walreceiver is stopped.
>> We use restore_command only in startup process - so we have no race condition between processes.
>> We have some issues here? Or we can just make restore_command reloadable as attached?
> 
> I don't see the problem here, either. Does anyone else see a problem,
> or some reason not to press forward with this?

Sorry for the late reply.  I have been looking at that stuff again,
and restore_command can be called in the context of a WAL sender
process within the page_read callback of logical decoding via
XLogReadDetermineTimeline(), as readTimeLineHistory() could look for a
timeline history file.  So restore_command is not used only in the
startup process.
--
Michael

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