pgsql-bugs(at)postgresql(dot)org writes:> Temp tables not deleted if postmaster crashes
This is dealt with in current sources, although not in the way you propose.
regards, tom lane