The following bug has been logged on the website:
Bug reference: 16854
Logged by: Katsuaki Fukushima
Email address: katsuaki.fukushima@gmail.com
PostgreSQL version: 13.1
Operating system: Windows 10 Enterprise and Windows Server 2019
Description:
In Microsoft Windows, initdb fails for ReFS and FAT32 file systems.
PostgreSQL 12.x worked fine.
The WAL allocated in the temporary is renamed to the canonical name with the
durable_rename_excl function in src/backend/storage/file/fd.c.
This function hardlinks to the canonical name and unlinks the temporary.
Since ReFS does not support hard linking, the CreateHardLinkA function in
src/port/link.c will fail and the OS will return error code 50.
I replaced CreateHardLinka(dst, src, NULL) with MoveFileA(src, dst), and it
works for now.
I haven't investigated the effect on others.