Regardign RecentFlushPtr in WalSndWaitForWal()

Поиск
Список
Период
Сортировка
От shveta malik
Тема Regardign RecentFlushPtr in WalSndWaitForWal()
Дата
Msg-id CAJpy0uBSCQz1yMD-WiEthzEe23dti2-Kr_pitVb7vAPFbFKm=A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Regardign RecentFlushPtr in WalSndWaitForWal()  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Re: Regardign RecentFlushPtr in WalSndWaitForWal()  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
Список pgsql-hackers
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.

Any thoughts?

[1]:
        /* Get a more recent flush pointer. */
        if (!RecoveryInProgress())
                RecentFlushPtr = GetFlushRecPtr(NULL);
        else
                RecentFlushPtr = GetXLogReplayRecPtr(NULL);

[2]:
                /* Update our idea of the currently flushed position. */
                else if (!RecoveryInProgress())
                        RecentFlushPtr = GetFlushRecPtr(NULL);
                else
                        RecentFlushPtr = GetXLogReplayRecPtr(NULL);

thanks
Shveta



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

Предыдущее
От: Xing Guo
Дата:
Сообщение: Re: Control your disk usage in PG: Introduction to Disk Quota Extension
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Synchronizing slots from primary to standby