Re: BUG #16846: "retrieved too many tuples in a bounded sort" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16846: "retrieved too many tuples in a bounded sort"
Date
Msg-id 2251077.1613402326@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #16846: "retrieved too many tuples in a bounded sort"  (James Coleman <jtc331@gmail.com>)
List pgsql-bugs
James Coleman <jtc331@gmail.com> writes:
> On Thu, Feb 11, 2021 at 12:06 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I stared at this for awhile and eventually convinced myself that it
>> implemented the same logic, but it still seems overly complex.  We
>> do not need either the firstTuple or lastTuple flags, and we could
>> convert the nTuple adjustments into a normal for-loop with (IMO)
>> much greater intelligibility.  What do you think of the attached?

> Yes, that looks even better. Not sure how I missed that I'd just
> reimplemented a normal for-loop with firstTuple/lastTuple conditions,
> but I guess that's the benefit of coming at it with fresh eyes and
> without the history of how it got the way it was.

> +1 on committing v2.

Sounds good, pushed.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16866: pg_basebackup Windows Server 2016
Next
From: PG Bug reporting form
Date:
Subject: BUG #16867: savepoints vs. commit and chain