On Sun, Apr 3, 2022 at 1:22 AM John Naylor <john.naylor@enterprisedb.com> wrote:
> I can confirm the problem on v10 as well.
We will need a backpatchable fix, since Thomas' recent fix (commit
cc58eecc5d75a9329a6d49a25a6499aea7ee6fd6) only targeted the master
branch.
If we really needed the performance advantage of abbreviated keys in
this case then it would have taken more than 7 years for this bug to
come to light. The backpatchable fix can be very simple. We can just
copy what tuplesort_set_bound() does with abbreviated keys in
tuplesort_begin_cluster(), to explicitly disable abbreviated keys
up-front for affected tuplesorts. (Just for CLUSTER tuplesorts on an
expression index.)
--
Peter Geoghegan