Thanks Aleksander and Álvaro for your inputs.
I understand this change is not making any improvement to the current
code. I was a bit concerned regarding the design and consistency of
the function that exists for the server in recovery and for the server
that is not in recovery. I was trying to
Hello
On 2022-Jul-20, Amul Sul wrote:
> If you look at GetFlushRecPtr() function the OUT parameter for
> TimeLineID is optional and this is not only one, see
> GetWalRcvFlushRecPtr(), GetXLogReplayRecPtr(), etc.
>
> I think we have missed that for GetStandbyFlushRecPtr(), to be
> inlined, we
Hi Amul,
> - *tli = replayTLI;
> + if (tli)
> + *tli = replayTLI;
I would guess the difference here is that GetStandbyFlushRecPtr is
static. It is used 3 times in walsender.c and in all cases the
argument can't be NULL.
So I'm not certain what we will gain from the proposed check.
--
Hi,
If you look at GetFlushRecPtr() function the OUT parameter for
TimeLineID is optional and this is not only one, see
GetWalRcvFlushRecPtr(), GetXLogReplayRecPtr(), etc.
I think we have missed that for GetStandbyFlushRecPtr(), to be
inlined, we should change this as follow:
---