Re: [PATCH] Atomic pgrename on Windows

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: [PATCH] Atomic pgrename on Windows
Дата
Msg-id CAPpHfduoOzaTbtG8DPKwS+C3rEpWZxM2-5DE0JA_a4VUBwmC0g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Atomic pgrename on Windows  (David Steele <david@pgmasters.net>)
Список pgsql-hackers
On Tue, Mar 6, 2018 at 5:11 PM, David Steele <david@pgmasters.net> wrote:
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.
 
Yes, that's naturally a bug.  Not very critical though.

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

In this thread we've found at least two possible approaches to fix this bug.  But both of them need to be implemented and tested.
 
Marked Returned with Feedback.

OK!

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Steele
Дата:
Сообщение: Re: [PATCH] Atomic pgrename on Windows
Следующее
От: David Steele
Дата:
Сообщение: Re: Re: [HACKERS] Subscription code improvements