Re: [proposal] recovery_target "latest"

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: g(dot)smolkin(at)postgrespro(dot)ru
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [proposal] recovery_target "latest"
Date: 2019-11-13 02:51:02
Message-ID: 20191113.115102.109124417991703544.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 8 Nov 2019 16:08:47 +0300, Grigory Smolkin <g(dot)smolkin(at)postgrespro(dot)ru> wrote in
> While working on it, I stumbled upon something strange:
>
> why DisownLatch(&XLogCtl->recoveryWakeupLatch) is called before
> ReadRecord(xlogreader, LastRec, PANIC, false) ?
> Isn`t this latch may be accessed in WaitForWALToBecomeAvailable() if
> streaming standby gets promoted?

The DisownLatch is just for the sake of tidiness and can be placed
anywhere after the ShutdownWalRcv() call but the current place (just
before "StandbyMode = false") seems natural. The ReadRecord call
doesn't launch another wal receiver because we cleard StandbyMode just
before.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2019-11-13 02:51:33 Re: ssl passphrase callback
Previous Message Amit Kapila 2019-11-13 02:38:12 Re: [HACKERS] Block level parallel vacuum