Re: BUG #16846: "retrieved too many tuples in a bounded sort"

Neil Chen <carpenter.nail.cz@gmail.com>

From: Neil Chen <carpenter.nail.cz@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: contact@yorhel.nl, pgsql-bugs@lists.postgresql.org
Date: 2021-02-05T03:07:12Z
Lists: pgsql-bugs
On Fri, Feb 5, 2021 at 8:17 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

>
> I poked at this until I found a small modification of the existing
> regression tests that would reach the problematic path with lastTuple
> true.  That confirmed that there's a problem, because it gave a flat-out
> wrong answer.  I'm not really familiar enough with this code to be sure
> if this is a complete fix, but it fixes the cases we have and it doesn't
> break anything else in our regression tests.  So, in view of the fact
> that we have 13.2 release deadline on Monday, I went ahead and pushed it.
> (I did rewrite your comment.)
>
>
That's great, I will also continue to try to check if it is a complete
fix.
Thank you.

-- 
There is no royal road to learning.
HighGo Software Co.

Commits

  1. Simplify loop logic in nodeIncrementalSort.c.

  2. Fix YA incremental sort bug.