Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> One option is to rename the file before deleting it.
I was under the impression that renaming would fail in the same cases
where deletion fails, ie something else holding the file open ...
regards, tom lane