I tried to disable "incremental sort", but it doesn't help. Completely disabling parallel query worked for me, but you are right it's quite a big change.
So we postpone the upgrade of Postgre in production for now.
I wish you luck with fixing that issue and I really appreciate your work / help.
Thanks
On Sun, Nov 29, 2020 at 2:22 PM James Coleman <jtc331@gmail.com> wrote:
That might workaround it for 13/13.1, though the attached plan has a sort, not an incremental sort, and so it's possible that won't help (disabling parallel query for this particular query would then resolve, but that's a fairly large sledgehammer).