Jean-Christophe Boggio <postgresql@xxxxxxxxxxxxxx> 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