Re: Standby accepts recovery_target_timeline setting?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: David Steele <david@pgmasters.net>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-09-28T17:45:22Z
Lists: pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes: >> Agreed. Seems like that could be added to the patch above easily >> enough. More checks would be needed to prevent the behaviors I've been >> seeing in the other thread, but it should be possible to more or less >> mimic the old behavior with sufficient checks. > Yeah, more checks would be necessary. IMO easy fix is to forbid not only > recovery target parameters but also any recovery parameters (specified > in recovery.conf in previous versions) in crash recovery. > In v11 or before, any parameters in recovery.conf cannot take effect in > crash recovery because crash recovery always starts without recovery.conf. > But in v12, those parameters are specified in postgresql.conf, > so they may take effect even in crash recovery (i.e., when both > recovery.signal and standby.signal are missing). This would be the root > cause of the problems that we are discussing, I think. So ... what I'm wondering about here is what happens during *actual* crash recovery, eg a postmaster-driven restart of the startup process after a backend crash in hot standby. The direction you guys are going in seems likely to cause the startup process to refuse to function until those parameters are removed from postgresql.conf, which seems quite user-unfriendly. Maybe I'm misunderstanding, but I think that rather than adding error checks that were not there before, the right path to fixing this is to cause these settings to be ignored if we're doing crash recovery. Not make the user take them out (and possibly later put them back). regards, tom lane
Commits
-
Make crash recovery ignore recovery_min_apply_delay setting.
- 03666dfa1817 12.1 landed
- 9b95a36be8be 13.0 landed
-
Make crash recovery ignore restore_command and recovery_end_command settings.
- fcf7f8d9242d 12.1 landed
- 20961ceaf042 13.0 landed
-
Make crash recovery ignore recovery target settings.
- 4af2ac3deeca 12.0 landed
- 7acf8a876b77 13.0 landed
-
doc: Further clarify how recovery target parameters are applied
- e04a53a6071d 13.0 landed
- a7e5ae53cbe7 12.0 landed
-
doc: Add timeline as valid recovery target in standby.signal documentation
- 775578a445bb 13.0 landed
- a37980d42824 12.0 landed