... btw, I did confirm that
set enable_incremental_sort = 0;
makes the error go away. So that might do as a temporary workarounduntil we fix it.
regards, tom lane