Re: BUG #16854: initdb fails on ReFS and FAT32 file systems

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: katsuaki(dot)fukushima(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org>
Cc: peter(dot)eisentraut(at)2ndquadrant(dot)com
Subject: Re: BUG #16854: initdb fails on ReFS and FAT32 file systems
Date: 2021-02-05 14:26:51
Message-ID: 59ad1f40-1bf2-a7e8-da22-7a279ea46efd@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2021/02/05 13:55, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 16854
> Logged by: Katsuaki Fukushima
> Email address: katsuaki(dot)fukushima(at)gmail(dot)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.

This issue seems to be related to commit aaa3aeddee. That commit log says

Previously, hard links were not used on Windows and Cygwin, but they
support them just fine in currently supported OS versions, so we can
use them there as well.

Since all supported platforms now support hard links, we can remove
the alternative code paths.

I'm not sure if ReFS is the supported platform or not. But if it is,
the assumption that the above commit log says is not correct. If so,
ISTM that we need to rethink the changes that commit introduced.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-02-05 15:26:15 Re: BUG #16854: initdb fails on ReFS and FAT32 file systems
Previous Message PG Bug reporting form 2021-02-05 10:44:32 BUG #16855: No partition pruning when using partitions with custom hash function