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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Peter Smith <smithpb2250(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-07-05 06:50:49
Message-ID: CAA4eK1K83ysa7XTb=auLLOj_B2U5KKFJyBm3FtAvtTLGX4hYCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 1, 2024 at 5:04 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> 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.
>

LGTM. I'll push this early next week unless someone thinks otherwise.
I have added a commit message in the attached.

--
With Regards,
Amit Kapila.

Attachment Content-Type Size
v3-0001-To-improve-the-code-move-the-error-check-in-logic.patch application/octet-stream 1.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nisha Moond 2024-07-05 06:52:29 Re: Conflict Detection and Resolution
Previous Message Dilip Kumar 2024-07-05 06:27:44 Re: Conflict Detection and Resolution