Re: [PATCH] Atomic pgrename on Windows - Mailing list pgsql-hackers

From David Steele
Subject Re: [PATCH] Atomic pgrename on Windows
Date
Msg-id 7c8d369e-a1c8-dc8b-bd45-6f32aa0fbd32@pgmasters.net
Whole thread Raw
In response to Re: Re: [PATCH] Atomic pgrename on Windows  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Responses Re: [PATCH] Atomic pgrename on Windows  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
On 3/6/18 9:06 AM, Alexander Korotkov wrote:
> 
> On Tue, Mar 6, 2018 at 5:04 PM, David Steele <david@pgmasters.net
> <mailto:david@pgmasters.net>> wrote:
> 
>     On 1/20/18 10:13 AM, Magnus Hagander wrote:
>     >
>     > Unlinking it first seems dangerous, as pointed out by Andres.
>     >
>     > What about first trying ReplaceFile() and then if it fails with "target
>     > doesn't exist", then call MoveFileEx().
>     >
>     > Or the other way around -- try MoveFileEx() first since that seems to
>     > work most of the time today (if it mostly broke we'd be in trouble
>     > already), and if it fails with a sharing violation, try ReplaceFile()?
>     > And perhaps end up doing it something similar to what we do with shared
>     > memory which is just to loop over it and try  each a couple of time,
>     > before giving up and failing?
> 
>     This patch was mistakenly left as Needs Review during the last
>     commitfest but it's pretty clear that a new patch is required.
> 
> OK!  No objections against marking this patch RWF.

Hmmm, I just noticed this categorized as a bug.  I thought it was a
refactor.

Even so, it looks like the approach needs a rethink so better to wait
for that.

Marked Returned with Feedback.

Thanks,
-- 
-David
david@pgmasters.net


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: JIT compiling with LLVM v11
Next
From: Alexander Korotkov
Date:
Subject: Re: [PATCH] Atomic pgrename on Windows