Re: File locks for data directory lockfile in the context of Linux namespaces - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: File locks for data directory lockfile in the context of Linux namespaces
Date
Msg-id c5jj2zvhnh36xfvqkcogrvk5fkcut3un5q5hibozfm62h6t4kp@sdlorh7uaf2s
Whole thread
In response to Re: File locks for data directory lockfile in the context of Linux namespaces  (Ilmar Yunusov <tanswis42@gmail.com>)
Responses Re: File locks for data directory lockfile in the context of Linux namespaces
List pgsql-hackers
> On Mon, Jul 06, 2026 at 07:30:04AM +0000, Ilmar Yunusov wrote:
>
> There is still a build blocker, matching the current CFBot failures. v3 adds a
> typedef named LockFile in src/backend/utils/init/miscinit.c, but that name
> conflicts with the Windows LockFile() function. The CompilerWarnings log
> reports, for example:

Thanks for looking into the build failure. I wanted to check it out what
was happening on Windows, but after the migration from Cirrus to Github
one have to be logged in to see the build logs, and at that moment I
found myself logged off.

Regarding the name, I'm afraid LockFileData has a chance of causing some
confusion due to a common pattern, where structures are named with
"Data" suffix and a pointer type definition without. Since it's about a
name clash with an external library, I suggest PGLockFile instead, but
open for better suggestions.

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: pg_threads.h take II
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: Can we get rid of TerminateThread() in pg_dump?