Re: Coding in WalSndWaitForWal - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Coding in WalSndWaitForWal
Date
Msg-id 20191111165340.GA12516@alvherre.pgsql
Whole thread Raw
In response to Re: Coding in WalSndWaitForWal  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Coding in WalSndWaitForWal  (Michael Paquier <michael@paquier.xyz>)
Re: Coding in WalSndWaitForWal  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: TestLib::command_fails_like enhancement
Next
From: Alvaro Herrera
Date:
Subject: Re: Binary support for pgoutput plugin