Re: Regardign RecentFlushPtr in WalSndWaitForWal()

Поиск
Список
Период
Сортировка
От Matthias van de Meent
Тема Re: Regardign RecentFlushPtr in WalSndWaitForWal()
Дата
Msg-id CAEze2Wgm=TvEeDmmyR3pF70k1vhbQFC25fUrV3cRk2HdEECxvg@mail.gmail.com
обсуждение исходный текст
Ответ на Regardign RecentFlushPtr in WalSndWaitForWal()  (shveta malik <shveta.malik@gmail.com>)
Ответы Re: Regardign RecentFlushPtr in WalSndWaitForWal()  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Mon, 26 Feb 2024 at 12:46, shveta malik <shveta.malik@gmail.com> wrote:
>
> Hi hackers,
>
> I would like to understand why we have code [1] that retrieves
> RecentFlushPtr in WalSndWaitForWal() outside of the loop. We utilize
> RecentFlushPtr later within the loop, but prior to that, we already
> have [2]. Wouldn't [2] alone be sufficient?
>
> Just to check the impact, I ran 'make check-world' after removing [1],
> and did not see any issue exposed by the test at-least.

Yeah, that seems accurate.

> Any thoughts?
[...]
> [2]:
>                 /* Update our idea of the currently flushed position. */
>                 else if (!RecoveryInProgress())

I can't find where this "else" of this "else if" clause came from, as
this piece of code hasn't changed in years. But apart from that, your
observation seems accurate, yes.

Kind regards,

Matthias van de Meent
Neon (https://neon.tech)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Volatile write caches on macOS and Windows, redux
Следующее
От: jian he
Дата:
Сообщение: src/include/miscadmin.h outdated comments