Re: Coding in WalSndWaitForWal

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Coding in WalSndWaitForWal
Date: 2019-11-11 16:53:40
Message-ID: 20191111165340.GA12516@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Nov-11, Amit Kapila wrote:

> On Mon, Nov 11, 2019 at 7:53 AM Michael Paquier <michael(at)paquier(dot)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 Content-Type Size
walsender.patch text/x-diff 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-11-11 16:55:59 Re: Binary support for pgoutput plugin
Previous Message Andrew Dunstan 2019-11-11 16:48:25 Re: TestLib::command_fails_like enhancement