Hi, Currently if pg_wal_replay_pause() is called after the standby promotion is triggerred before the promotion has successfully finished, WAL replay is paused. That is, the replay pause is preferred than the promotion. Is this desiderable behavior?
ISTM that most users including me want the recovery to complete as soon as possible and the server to become the master when they requeste the promotion. So I'm thinking to change the recovery so that it ignore the pause request after the promotion is triggerred. Thought? I want to start this discussion because this is related to the patch (propoesd at the thread [1]) that I'm reviewing. It does that partially, i.e., prefers the promotion only when the pause is requested by recovery_target_action=pause. But I think that it's reasonable and more consistent to do that whether whichever the pause is requested by pg_wal_replay_pause() or recovery_target_action. BTW, regarding "replay pause vs. delayed standby", any wait by recovery_min_apply_delay doesn't happen after the promotion is triggerred. IMO "pause" should be treated as the similar. [1] https://www.postgresql.org/message-id/flat/19168211580382...@myt5-b646bde4b8f3.qloud-c.yandex.net Regards, -- Fujii Masao NTT DATA CORPORATION Advanced Platform Technology Group Research and Development Headquarters