Andrew Dunstan <andrew@dunslane.net> writes:
> The small wrinkle here is that rmtree needs to make a copy of the file
> names before it starts removing things. In the backend case that means
> calling palloc() and friends - am I correct in assuming it is reasonable
> to do this in whatever context happens to be current when rmtree is
> called?
Sure.
regards, tom lane