From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Atsushi Torikoshi <atorik(at)gmail(dot)com> |
Cc: | Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Sergei Kornilov <sk(at)zsrv(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: replay pause vs. standby promotion |
Date: | 2020-03-23 06:51:45 |
Message-ID: | 997e35b7-4f2e-294b-0bbb-ced4d1dcd59d@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020/03/20 15:22, Atsushi Torikoshi wrote:
>
> On Fri, Mar 6, 2020 at 10:18 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com <mailto:masao(dot)fujii(at)oss(dot)nttdata(dot)com>> wrote:
>
>
> OK, so patch attached.
>
> This patch causes, if a promotion is triggered while recovery is paused,
> the paused state to end and a promotion to continue. OTOH, this patch
> makes pg_wal_replay_pause() and _resume() throw an error if it's executed
> while a promotion is ongoing.
>
> Regarding recovery_target_action, if the recovery target is reached
> while a promotion is ongoing, "pause" setting will act the same as "promote",
> i.e., recovery will finish and the server will start to accept connections.
>
> To implement the above, I added new shared varible indicating whether
> a promotion is triggered or not. Only startup process can update this shared
> variable. Other processes like read-only backends can check whether
> promotion is ongoing, via this variable.
>
> I added new function PromoteIsTriggered() that returns true if a promotion
> is triggered. Since the name of this function and the existing function
> IsPromoteTriggered() are confusingly similar, I changed the name of
> IsPromoteTriggered() to IsPromoteSignaled, as more appropriate name.
>
>
> I've confirmed the patch works as you described above.
> And I also poked around it a little bit but found no problems.
Thanks for the review!
Barrying any objection, I will commit the patch.
Regards,
--
Fujii Masao
NTT DATA CORPORATION
Advanced Platform Technology Group
Research and Development Headquarters
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2020-03-23 06:55:34 | Re: Internal key management system |
Previous Message | Pavel Stehule | 2020-03-23 06:30:25 | Re: [HACKERS] [PATCH] Generic type subscripting |