replay pause vs. standby promotion - Mailing list pgsql-hackers

From Fujii Masao
Subject replay pause vs. standby promotion
Date
Msg-id 00c194b2-dbbb-2e8a-5b39-13f14048ef0a@oss.nttdata.com
Whole thread Raw
Responses Re: replay pause vs. standby promotion  (Sergei Kornilov <sk@zsrv.org>)
List pgsql-hackers
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/19168211580382043@myt5-b646bde4b8f3.qloud-c.yandex.net

Regards,

-- 
Fujii Masao
NTT DATA CORPORATION
Advanced Platform Technology Group
Research and Development Headquarters



pgsql-hackers by date:

Previous
From: Hamid Akhtar
Date:
Subject: Re: Minor issues in .pgpass
Next
From: Fujii Masao
Date:
Subject: Re: Minor issues in .pgpass