Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Wilm Hoyer <W(dot)Hoyer(at)dental-vision(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Date: 2022-04-27 08:13:12
Message-ID: Ymj7GHBfTnaN5kWW@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Tue, Apr 26, 2022 at 12:54:35PM +0800, Julien Rouhaud wrote:
> I searched a bit and apparently some people are using this function directly
> opening some dll, which seems wrong.

I was wondering about this whole business, and the manifest approach
is a *horrible* design for an API where the goal is to know if your
run-time environment is greater than a given threshold.

>> Another Idea on windows machines would be to use the commandline to execute
>> ver in a separate Process and store the result in a file.
>
> That also seems hackish, I don't think that we want to rely on something like
> that.

Hmm. That depends on the dependency set, I guess. We do that on
Linux at some extent to for large pages in sysv_shmem.c. Perhaps this
could work for Win10 if this avoids the extra loopholes with the
manifests.

> Their API is entirely useless,

This I agree.

> so I'm still on the opinion that we should
> unconditionally use the FILE_MAP_LARGE_PAGES flag if it's defined and call it a
> day.

Are we sure that this is not going to cause failures in environments
where the flag is not supported?
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2022-04-27 10:01:03 Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Previous Message Michael Paquier 2022-04-27 03:00:49 Re: Fix primary crash continually with invalid checkpoint after promote

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2022-04-27 08:17:11 Re: pgsql: Add contrib/pg_walinspect.
Previous Message Peter Eisentraut 2022-04-27 07:17:35 Re: Fix NULL pointer reference in _outPathTarget()