Jean-Christophe Boggio <postgresql@thefreecat.org> writes:
> You can find the corresponding logs attached.
Your query seems to be creating TupleSort contexts and then leaking
them, which is surely a bug. Can you make a self-contained test
case that reproduces this?
regards, tom lane