Re: Buglet in "Sort Method" explain output in degenerate case - Mailing list pgsql-patches

From Tom Lane
Subject Re: Buglet in "Sort Method" explain output in degenerate case
Date
Msg-id 24125.1188672605@sss.pgh.pa.us
Whole thread Raw
In response to Re: Buglet in "Sort Method" explain output in degenerate case  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
I wrote:
> Hmm.  Actually, given that sort_bounded_heap() is only conditionally
> invoked, *both* of the state updates it makes are bogus.

Er, make that three state updates: its REVERSEDIRECTION() operation is
being skipped as well.  That's not critical now, but might be someday.

Rather than moving all that up to tuplesort_performsort, it seems better
to leave it where it is, and instead remove the premature optimization
of trying to skip sort_bounded_heap.  The number of cycles saved that
way is tiny anyway...

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Buglet in "Sort Method" explain output in degenerate case
Next
From: Gregory Stark
Date:
Subject: Re: Buglet in "Sort Method" explain output in degenerate case