Re: walsender.c comment with no context is hard to understand

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: walsender.c comment with no context is hard to understand
Date: 2024-06-30 23:34:04
Message-ID: CAHut+PukgSkO=mA8-dcSVXyTGGFaus0eZjOL0gacwQzMQ1UpHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 28, 2024 at 4:18 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
...
> Shouldn't the check for flushptr (if (flushptr < targetPagePtr +
> reqLen)) be moved immediately after the call to WalSndWaitForWal().
> The comment seems to suggests the same: "Make sure we have enough WAL
> available before retrieving the current timeline. .."

OK, I have changed the code as suggested. Please see the attached v2 patch.

make check-world was successful.

======
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v2-0001-Relocate-the-flushptr-checking-code.patch application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-06-30 23:35:34 Creation of REL_17_STABLE and upcoming Commit Fest 2024-07
Previous Message Noah Misch 2024-06-30 23:18:16 Re: collect_corrupt_items_vacuum.patch