Re: walsender.c comment with no context is hard to understand - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: walsender.c comment with no context is hard to understand
Date
Msg-id CAA4eK1K2XwZaqoBvLu2VqyT6mnQp6xSrb3LFCms_qfWa=vyAgQ@mail.gmail.com
Whole thread Raw
In response to Re: walsender.c comment with no context is hard to understand  (Peter Smith <smithpb2250@gmail.com>)
Responses Re: walsender.c comment with no context is hard to understand
List pgsql-hackers
On Fri, Jun 28, 2024 at 5:15 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> On Thu, Jun 27, 2024 at 3:44 PM Michael Paquier <michael@paquier.xyz> wrote:
> >
> > On Wed, Jun 26, 2024 at 02:30:26PM +0530, vignesh C wrote:
> > > On Mon, 3 Jun 2024 at 11:21, Peter Smith <smithpb2250@gmail.com> wrote:
> > >> Perhaps the comment should say something like it used to:
> > >> /* Fail if there is not enough WAL available. This can happen during
> > >> shutdown. */
> > >
> > > Agree with this, +1 for this change.
> >
> > That would be an improvement.  Would you like to send a patch with all
> > the areas you think could stand for improvements?
> > --
>
> OK, I attached a patch equivalent of the suggestion in this thread.
>

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. .."

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: remaining sql/json patches
Next
From: Peter Eisentraut
Date:
Subject: Re: Support LIKE with nondeterministic collations