Re: [proposal] recovery_target "latest" - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: [proposal] recovery_target "latest"
Date
Msg-id 20191113.115102.109124417991703544.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: [proposal] recovery_target "latest"  (Grigory Smolkin <g.smolkin@postgrespro.ru>)
List pgsql-hackers
At Fri, 8 Nov 2019 16:08:47 +0300, Grigory Smolkin <g.smolkin@postgrespro.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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Block level parallel vacuum
Next
From: Bruce Momjian
Date:
Subject: Re: ssl passphrase callback