On 2019-Nov-11, Amit Kapila wrote:
> On Mon, Nov 11, 2019 at 7:53 AM Michael Paquier <michael@paquier.xyz> wrote:
> > So your suggestion would be to call GetFlushRecPtr() before the first
> > check on RecentFlushPtr and before entering the loop?
>
> No. What I meant was to keep the current code as-is and have an
> additional check on RecentFlushPtr before entering the loop.
I noticed that the "return" at the bottom of the function does a
SetLatch(), but the other returns do not. Isn't that a bug?
Also, what's up with those useless returns?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services