Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1ilz-00014j-Lq for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jun 2022 06:14:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o1ily-0007Am-F7 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Jun 2022 06:14:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1ilx-00076p-1R for pgsql-hackers@lists.postgresql.org; Thu, 16 Jun 2022 06:14:30 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1ils-0002Xq-2n for pgsql-hackers@lists.postgresql.org; Thu, 16 Jun 2022 06:14:28 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C6DB05C05BB; Thu, 16 Jun 2022 02:14:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 16 Jun 2022 02:14:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1655360061; x=1655446461; bh=w7Pbv6MvbJ yXSx7nbOqKRZ99/lDGO3mpzs13H2hisWg=; b=O2tXqqBqw7GYoH7oik6Q0vnM9y n7nL2SzNkoQzNAcE9Ghdwm5w8xOReZ3exMJCYn45hfzWwUwSbvCo6P7B3r9m8S1Q DA7DkYIKWlICSsSknycPt/G3u4cvbAJSK00W6WJLgKFzdUxri/4TwTOyZbhyGSXO MTnXtC+5cifWtrjWI6iuQKMtFFxX0BWLIbBPcupE9Shxf2PGblbxSv/qJ9taDffR SXOk+Zg1sboatmKGRo9CebR+qzIfzRGXIBkhnVTNwzP26nyxargA1V+M2l+MjGGq baeYhFNl715Iz8Q7e4Hujk8XoU+cHrnejLbudCmtuJDf3GO8YyLP7ODzDfbw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1655360061; x=1655446461; bh=w7Pbv6MvbJyXSx7nbOqKRZ99/lDG O3mpzs13H2hisWg=; b=U3vqhr4G+PZBWEPhXe6JELE2aRivokMm1qbayH4ucTbH xBXG9gSFZDNI1pHzmAAt/tDryALmLbWdECBMVy5cIvWMuimd0B29OqCcpu9pMxDv uaUHV/c2trmkqOX5xaESADReDbpUZa9m7Ha4scI+NOcwFJo+fOzfHQFbc41DHrNS MBdhtX07m8zIWHYhkuM+Wx780gaiary6GICJbQrGHTbjqNZzRrcqQtfy5PPfsEmT KSvNPar38uBiSu6OQH8jB30RNUAg3XqO8rnZKhpbIks4qdkd93ls6ma3gDl9pj+g gOyMU8U4Cey6Ume/+L471MCiA17zSmyYi5g2MzJglQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddvvddguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreer tddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlse hprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteel geeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdig hiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Jun 2022 02:14:20 -0400 (EDT) Date: Thu, 16 Jun 2022 15:14:16 +0900 From: Michael Paquier To: Thomas Munro Cc: Daniel Gustafsson , Juan =?iso-8859-1?Q?Jos=E9_Santamar=EDa?= Flecha , Postgres hackers Subject: Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~ Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+wc88nePcvy4Ekju" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --+wc88nePcvy4Ekju Content-Type: multipart/mixed; boundary="nOZFoaiBcj29Gjj7" Content-Disposition: inline --nOZFoaiBcj29Gjj7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 09, 2022 at 02:47:36PM +0900, Michael Paquier wrote: > On Thu, Jun 09, 2022 at 04:55:45PM +1200, Thomas Munro wrote: >> I think we can drop mention of Itanium (RIP): the ancient versions of >> Windows that could run on that arch are desupported with your patch. >> It might be more relevant to say that we can't yet run on ARM, and >> Windows 11 is untested by us, but let's fix those problems instead of >> documenting them :-) >=20 > Okay to remove the Itanium part for me. install-windows.sgml has one extra spot mentioning Windows 7 and Server 2008 that can be simplified on top of that. >> There are more mentions of older Windows releases near the compiler >> stuff but perhaps your MSVC version vacuuming work will take care of >> those. >=20 > Yes, I have a few changes like the one in main.c for _M_AMD64. Are > you referring to something else? Actually, this can go with the bump of MIN_WINNT as it uses one of the IsWindows*OrGreater() macros as a runtime check. And there are two more places in pg_ctl.c that can be similarly cleaned up. It is possible that I have missed some spots, of course. -- Michael --nOZFoaiBcj29Gjj7 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v3-0001-Bump-WIN_MINNT-to-0x0A00-everywhere-Windows-10.patch" Content-Transfer-Encoding: quoted-printable =46rom 2d51b7dd04e44ace0294531878676ff89e465c0b Mon Sep 17 00:00:00 2001 =46rom: Michael Paquier Date: Thu, 16 Jun 2022 15:11:53 +0900 Subject: [PATCH v3] Bump WIN_MINNT to 0x0A00 everywhere (Windows 10~) --- src/include/port/win32.h | 11 +++-------- src/backend/main/main.c | 17 ----------------- src/backend/utils/adt/pg_locale.c | 4 ++-- src/bin/pg_ctl/pg_ctl.c | 26 ++------------------------ doc/src/sgml/install-windows.sgml | 9 ++------- doc/src/sgml/installation.sgml | 9 ++++----- 6 files changed, 13 insertions(+), 63 deletions(-) diff --git a/src/include/port/win32.h b/src/include/port/win32.h index c6213c77c3..fe0829cedc 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -11,15 +11,10 @@ =20 /* * Make sure _WIN32_WINNT has the minimum required value. - * Leave a higher value in place. When building with at least Visual - * Studio 2015 the minimum requirement is Windows Vista (0x0600) to - * get support for GetLocaleInfoEx() with locales. For everything else - * the minimum version is Windows XP (0x0501). + * Leave a higher value in place. The minimum requirement is Windows 10. */ -#if defined(_MSC_VER) && _MSC_VER >=3D 1900 -#define MIN_WINNT 0x0600 -#else -#define MIN_WINNT 0x0501 +#if defined(_MSC_VER) +#define MIN_WINNT 0x0A00 #endif =20 #if defined(_WIN32_WINNT) && _WIN32_WINNT < MIN_WINNT diff --git a/src/backend/main/main.c b/src/backend/main/main.c index c43a527d3f..dd82722ee3 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -290,23 +290,6 @@ startup_hacks(const char *progname) _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); - -#if defined(_M_AMD64) && _MSC_VER =3D=3D 1800 - - /*---------- - * Avoid crashing in certain floating-point operations if we were - * compiled for x64 with MS Visual Studio 2013 and are running on - * Windows prior to 7/2008R2 SP1 on an AVX2-capable CPU. - * - * Ref: https://connect.microsoft.com/VisualStudio/feedback/details/8110= 93/visual-studio-2013-rtm-c-x64-code-generation-bug-for-avx2-instructions - *---------- - */ - if (!IsWindows7SP1OrGreater()) - { - _set_FMA3_enable(0); - } -#endif /* defined(_M_AMD64) && _MSC_VER =3D=3D 1800 */ - } #endif /* WIN32 */ =20 diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_l= ocale.c index a0490a7522..4c39841b99 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -1729,7 +1729,7 @@ get_collation_actual_version(char collprovider, const= char *collcollate) else ereport(ERROR, (errmsg("could not load locale \"%s\"", collcollate))); -#elif defined(WIN32) && _WIN32_WINNT >=3D 0x0600 +#elif defined(WIN32) /* * If we are targeting Windows Vista and above, we can ask for a name * given a collation name (earlier versions required a location code @@ -1757,7 +1757,7 @@ get_collation_actual_version(char collprovider, const= char *collcollate) collcollate, GetLastError()))); } - collversion =3D psprintf("%d.%d,%d.%d", + collversion =3D psprintf("%ld.%ld,%ld.%ld", (version.dwNLSVersion >> 8) & 0xFFFF, version.dwNLSVersion & 0xFF, (version.dwDefinedVersion >> 8) & 0xFFFF, diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index dd78e5bc66..ef58883a5c 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -1896,17 +1896,8 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATI= ON *processInfo, bool as_ser /* Verify that we found all functions */ if (_IsProcessInJob =3D=3D NULL || _CreateJobObject =3D=3D NULL || _SetIn= formationJobObject =3D=3D NULL || _AssignProcessToJobObject =3D=3D NULL || = _QueryInformationJobObject =3D=3D NULL) { - /* - * IsProcessInJob() is not available on < WinXP, so there is no need - * to log the error every time in that case - */ - if (IsWindowsXPOrGreater()) - - /* - * Log error if we can't get version, or if we're on WinXP/2003 or - * newer - */ - write_stderr(_("%s: WARNING: could not locate all job object functions = in system API\n"), progname); + /* Log error if we can't get version */ + write_stderr(_("%s: WARNING: could not locate all job object functions i= n system API\n"), progname); } else { @@ -1946,19 +1937,6 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATI= ON *processInfo, bool as_ser JOB_OBJECT_UILIMIT_EXITWINDOWS | JOB_OBJECT_UILIMIT_READCLIPBOARD | JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS | JOB_OBJECT_UILIMIT_WRITECLIPBO= ARD; =20 - if (as_service) - { - if (!IsWindows7OrGreater()) - { - /* - * On Windows 7 (and presumably later), - * JOB_OBJECT_UILIMIT_HANDLES prevents us from - * starting as a service. So we only enable it on - * Vista and earlier (version <=3D 6.0) - */ - uiRestrictions.UIRestrictionsClass |=3D JOB_OBJECT_UILIMIT_HANDLES; - } - } _SetInformationJobObject(job, JobObjectBasicUIRestrictions, &uiRestri= ctions, sizeof(uiRestrictions)); =20 securityLimit.SecurityLimitFlags =3D JOB_OBJECT_SECURITY_NO_ADMIN | J= OB_OBJECT_SECURITY_ONLY_TOKEN; diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windo= ws.sgml index bcfd5a1a10..66567d17a0 100644 --- a/doc/src/sgml/install-windows.sgml +++ b/doc/src/sgml/install-windows.sgml @@ -82,11 +82,7 @@ as well as standalone Windows SDK releases 8.1a to 10. 64-bit PostgreSQL builds are supported with Microsoft Windows SDK version 8.1a to 10 or - Visual Studio 2013 and above. Compilation - is supported down to Windows 7 and - Windows Server 2008 R2 SP1 when building with - Visual Studio 2013 to - Visual Studio 2022. + Visual Studio 2013 and above.