Re: replay pause vs. standby promotion

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>, Atsushi Torikoshi <atorik(at)gmail(dot)com>
Cc: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, "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-24 03:54:25
Message-ID: 611664c2-f715-72ca-865c-145fc6fe64d4@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/03/24 0:57, Fujii Masao wrote:
>
>
> On 2020/03/24 0:17, Sergei Kornilov wrote:
>> Hello
>>
>>> You meant that the promotion request should cause the recovery
>>> to finish immediately even if there are still outstanding WAL records,
>>> and cause the standby to become the master?
>>
>> Oh, I get your point. But yes, I expect that in case of promotion request during a pause, the user (me too) will want to have exactly the current state, not latest available in WALs.
>
> Basically I'd like the promotion to make the standby replay all the WAL
> even if it's requested during pause state. OTOH I understand there
> are use cases where immediate promotion is useful, as you explained.
> So, +1 to add something like "pg_ctl promote -m immediate".
>
> But I'm afraid that now it's too late to add such feature into v13.
> Probably it's an item for v14....

I pushed the latest version of the patch. If you have further opinion
about immediate promotion, let's keep discussing that!

Also we need to go back to the original patch posted at [1].

[1]
https://www.postgresql.org/message-id/flat/19168211580382043(at)myt5-b646bde4b8f3(dot)qloud-c(dot)yandex(dot)net

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-03-24 04:00:59 Re: Negative cost is seen for plan node
Previous Message Alvaro Herrera 2020-03-24 03:44:38 Re: [PATCH] Incremental sort (was: PoC: Partial sort)