Re: Win32 rename()/unlink() questionst - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Win32 rename()/unlink() questionst
Date
Msg-id 16739.1032537017@sss.pgh.pa.us
Whole thread Raw
In response to Re: Win32 rename()/unlink() questionst  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Win32 rename()/unlink() questionst
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Greg Copeland
Date:
Subject: Re: Having no luck with getting pgbench to run multiple
Next
From: Justin Clift
Date:
Subject: Re: Having no luck with getting pgbench to run multipletimes