Re: Atomic rename feature for Windows.

From: Victor Spirin <v(dot)spirin(at)postgrespro(dot)ru>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Atomic rename feature for Windows.
Date: 2021-10-04 19:51:09
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Thank you

Thank you
In this version of patch:

1. Made function isWindows1607OrGreater() without manifest

2. To open a directory using CreateFile, have to specify the
FILE_FLAG_BACKUP_SEMANTICS flag as part of dwFlagsAndAttributes. Checks
that file is a directory by the GetFileAttributes function.

Victor Spirin
Postgres Professional:
The Russian Postgres Company

01.10.2021 15:37, Juan José Santamaría Flecha пишет:
> On Thu, Sep 30, 2021 at 11:00 PM Victor Spirin
> <v(dot)spirin(at)postgrespro(dot)ru <mailto:v(dot)spirin(at)postgrespro(dot)ru>> wrote:
> IsWindowsVersionOrGreater(10,0,1607) always returns false
> Only IsWindowsVersionOrGreater(10,0,0) is a valid call. (There are
> no service packs in Windows 10.)
> I haven't found a way to determine the Windows 10 release ID.
> The RtlGetVersion function returns dwBuildNumber = 19042 on my
> Windows.
> I heard that Microsoft does not support older versions of Windows
> 10 and requires a mandatory update.
> You can translate the BuildNumber to the ReleaseId, for 1607 it will
> be 14393 [1].
> We might find pretty much anything in the wild, the safer the check
> the better.
> [1]
> <>
> Regards,
> Juan José Santamaría Flecha

Attachment Content-Type Size
rename_master_ver12.patch text/plain 5.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-10-04 19:54:00 Re: Duplicat-word typos in code comments
Previous Message Daniel Gustafsson 2021-10-04 19:19:50 Re: Duplicat-word typos in code comments