Re: Misleading comment in tuplesort_set_bound - Mailing list pgsql-hackers

From James Coleman
Subject Re: Misleading comment in tuplesort_set_bound
Date
Msg-id CAAaqYe9jgGUn8dMCDipb8o6Rfz4_tOEVMvdOgmjQ25n3W585iA@mail.gmail.com
Whole thread Raw
In response to Re: Misleading comment in tuplesort_set_bound  (Alvaro Herrera from 2ndQuadrant <alvherre@alvh.no-ip.org>)
Responses Re: Misleading comment in tuplesort_set_bound  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Yes, planning on it, just a bit behind right now so will likely be a
few more days at least.

On Thu, Sep 5, 2019 at 4:57 PM Alvaro Herrera from 2ndQuadrant
<alvherre@alvh.no-ip.org> wrote:
>
> On 2019-Aug-26, Tom Lane wrote:
>
> > James Coleman <jtc331@gmail.com> writes:
>
> > I think the comment is fine as-is.  Perhaps the code would be clearer
> > though, if we merged those two asserts into one?
> >
> >       /* Assert we're called before loading any tuples */
> >       Assert(state->status == TSS_INITIAL &&
> >              state->memtupcount == 0);
>
> Makes sense to me.  James, do you want to submit a new patch?
>
> > I'm not totally sure about the usefulness/relevance of the two
> > assertions following these, but they could likely do with their
> > own comment(s), because this one surely isn't covering them.
>
>
> --
> Álvaro Herrera                https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera from 2ndQuadrant
Date:
Subject: Re: Misleading comment in tuplesort_set_bound
Next
From: Andres Freund
Date:
Subject: Re: BUG #15977: Inconsistent behavior in chained transactions