Don’t you think it as a drawback of postgres that such temporary files don’t get deleted automatically once the transaction gets committed or rolled back .
They are automatically removed in case of a proper commit or rollback. They aren't in case of a crash.
Could you suggest a good permanent solution for such case.