Re: BUG #19881: CLUSTER uses a disabled sort path when enable_sort is off
On Sat, Nov 21, 2026 at 3:54 PM Fujii Masao <masao.fujii@gmail.com> wrote:
It's helpful if you provide the patches for old stable versions.
Attached is a version for REL_18_STABLE. It has only the
compare_path_costs() part, since 18 has no default_pgs_mask, and the test
checks only enable_sort. I ran it on REL_18_STABLE: the regression tests
pass, and without the code change the new test fails ("using sequential
scan and sort" instead of "using index scan").
REL_17_STABLE and older don't need it. They still add disable_cost to a
disabled sort, so comparing total_cost already avoids it there. v2 applies
to REL_19_STABLE as is.
BTW, regarding the discussion on the list, could you avoid top-posting?
Bottom-posting is the preferred style on this mailing list.
Sorry about that, I'll bottom-post from now on.
Regards,
Sai Pranav