Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think we may be best just looping on MoveFileEx() until is succeeds.
> We do the pg_pwd writes while holding an exclusive lock on pg_shadow so
> that will guarantee that no one else will slip an old version of the
> file in after we have written it. However, it also prevents pg_shadow
> access while we are doing the looping. Yuck.
Surely you're not evaluating this on the assumption that the pg_shadow
triggers are the only places that use rename() ?
I see other places in pgstat and relcache that expect rename() to work
per Unix spec.
regards, tom lane