I wonder if anyone has plans to try again with this optimization in v14 cycle? The patches no longer apply thanks to the incremental sort patch, but I suppose fixing that should not be extremely hard.
I found this feature interesting and I'd like to join.
PFA the updated version of the patch made fully compatible with changes in v13 and I suppose it is ready to be reviewed for v14.
Main things changed:
1. Patch is made compatible with new lists representation ( 1cff1b95ab6d )
2. Patch is made compatible with the incremental sort ( d2d8a229bc58 and ba3e76cc571e )
3. Tests are changed to represent changes in keys numbering and naming convention in the plan ( 55a1954da16 and 6ef77cf46e8 )