Regardless, I think we should go ahead and apply the current patch.
Yeah, it is definitely improving things. It turns out that I made almost the same
patch for our fork of Postgres, commissioned by one of the clients dealing with
truncation of huge amount of temp relations. Back in the days, it solves the
problem for him. But then I utterly forgot to share it with the community.
Shame on me.
Anyway, the patch looks good to me. Hope, it will be committed soon.
-- Best regards,
Maxim Orlov.