On 3/5/21 6:57 PM, Tom Lane wrote:
Not sure how fast that is either. If you need to do it again, you could
try manually rm'ing everything under the pgsql_tmp directory before
letting the postmaster start.
That is actually a strategy that works rather well. mv(1) the tmp
directory to something date(1) based, then kick off a recursive rm(1)
-rf on everything named pgsql_tmp_*. That won't miss anything in the
case the whole server is restarted while the procedure is under way. It
can cause multiple rm(1) processes trampling over each other, but that
has no real ill side effects. They are just trying to unlink a file
another one already did.
Under normal circumstances the rm(1) will clean up while the postmaster
is already up and possibly created a new pgsql_tmp.
Regards, Jan
--
Jan Wieck
Principle Database Engineer
Amazon Web Services