Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain
Date
Msg-id CA+hUKGJsb0ni=6TLS4oEamBrjTFzONBjSWZ7FYvjZzOZ=z=FXw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Dec 23, 2025 at 10:50 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > That revealed another problem: Mkvcbuild.pm didn't add -lpgport.  It
> > looks out for the pattern PG_LIBS_INTERNAL = $(libpq_pgport), so
> > that's an easy way to fix that -- is there a better way?  I couldn't
> > figure out how to tell it that we need libpqport but not libpq.
>
> AFAICT from looking at v16 Mkvcbuild.pm, PG_LIBS_INTERNAL = $(libpq_pgport)
> will do exactly what you want because that only triggers it to add
> libpgport and libpgcommon (cf. lines 1053ff).  I'm a little baffled
> by that --- shouldn't it be pulling in libpq as well?  But let's let
> sleeping dogs lie.

Thanks for looking.  Yeah.  That line should probably be v16-only,
conditional on Windows and have a comment to explain.  Will confirm
that and push this later today, along with those two CI changes[1][2]
that would have avoided all this trouble.

[1] https://www.postgresql.org/message-id/CA%2BhUKG%2BFRtqt0ZZVxb4e4h1gRnpECvehGB5JHqK73q8LxhbbVQ%40mail.gmail.com
[2] https://www.postgresql.org/message-id/CA%2BhUKGJreZe9jzPA6jDsLLB18d7M0rvypdbV18UBMxiFxdsf2g%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Switch buffile.c/h to use pgoff_t
Next
From: Michael Paquier
Date:
Subject: Re: Orphaned records in pg_replication_origin_status after subscription drop