Re: Atomic rename feature for Windows.

From: Victor Spirin <v(dot)spirin(at)postgrespro(dot)ru>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Atomic rename feature for Windows.
Date: 2021-11-30 16:56:09
Message-ID: ae02fe67-4988-b5b6-a683-726bb26e21d8@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

The flags for calling the CreateFile function have been changed.

Victor Spirin
Postgres Professional:http://www.postgrespro.com
The Russian Postgres Company

05.07.2021 16:53, Victor Spirin пишет:
> Hi
>
> I used the SetFileInformationByHandle function with the
> FILE_RENAME_FLAG_POSIX_SEMANTICS flag for the file rename function..
>
> 1) The _WIN32_WINNT variable needs to be increased to 0x0A00 (Windows
> 10).  Fixed conflict with #undef CHECKSUM_TYPE_NONE
>
> 2) The SetFileInformationByHandle function works correctly only on
> Windows 10 and higher.
>
> The app must have a manifest to check the Windows version using the
> IsWindows10OrGreater() function. I added a manifest to all postgres
> projects and disabled the GenerateManifest option on windows projects.
>
> This patch related to this post:
> https://www.postgresql.org/message-id/CAEepm%3D0FV-k%2B%3Dd9z08cW%3DZXoR1%3Dkw9wdpkP6WAuOrKJdz-8ujg%40mail.gmail.com
>
>

Attachment Content-Type Size
rename_master15.patch text/plain 7.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2021-11-30 17:48:15 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file
Previous Message Laurenz Albe 2021-11-30 16:47:18 Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file