Re: Wonky rename semantics on Windows

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Wonky rename semantics on Windows
Date: 2018-11-21 04:51:17
Message-ID: CAEepm=05gEKW9ir1Po5XEn2_Y9p7Sv37h+vsWvfKhmE-1LvGCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 21, 2018 at 5:43 PM Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> Googling led me to some recently posted clues on SO and elsewhere
> about a flag FILE_RENAME_FLAG_POSIX_SEMANTICS which can be used with
> SetFileInformationByHandle(), that wasn't mentioned in the earlier
> -hackers threads. I tried it on AppVeyor. It appears to work, even
> when both source and target file name exist and both files currently
> have an open handle. Perhaps they needed this for the Windows 10 WSL
> stuff?

Erm, looks like I posted too soon. My 5 minute hack didn't check the
return code correctly (it's zero for failure). Oh well. I don't
actually plan to investigate this any further myself, being
non-Windows-enabled, but it looks like there might still be something
promising here.

--
Thomas Munro
http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul Guo 2018-11-21 04:54:30 A WalSnd issue related to state WALSNDSTATE_STOPPING
Previous Message Thomas Munro 2018-11-21 04:43:47 Wonky rename semantics on Windows