Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sL4ay-00DLA1-Lp for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Jun 2024 17:32:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sL4at-00ChER-Pb for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Jun 2024 17:32:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sL4at-00ChEJ-ET for pgsql-hackers@lists.postgresql.org; Sat, 22 Jun 2024 17:32:07 +0000 Received: from dd25110.kasserver.com ([85.13.146.49]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sL4ar-00313k-Ft for pgsql-hackers@lists.postgresql.org; Sat, 22 Jun 2024 17:32:07 +0000 Received: from [192.168.0.101] (ip-037-201-153-175.um10.pools.vodafone-ip.de [37.201.153.175]) by dd25110.kasserver.com (Postfix) with ESMTPSA id 4F6E6E1A023C; Sat, 22 Jun 2024 19:32:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=technowledgy.de; s=kas202308201259; t=1719077522; bh=giIb4bdm+pSg9fjtm8kGpDWP0B0Z2MD34neia+MfGtI=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=t7f3SE205tDdbqlfql+QSRR0I+xGEEBezDUB+L/bnOEi/JWQPPoHDzOfBTkMCXaIm Z6OUMMjLAnrDLFjEncVj7vBTnaPR4NqRbObHWnp3fcA1PrIMnjr0ryjaC4DhCVX+lY X6DZfjlCgGSRs4TR2Wri9yDlGfhuXK+H4AR6vtPyIOsuR+6Ou4l4k8c+5HYaYfPnki lKSabLyPX9mzD4pxZOgUAdjG0lQ1nW4nJGHqHi4TjDUjthcHazcyeMMG0N/mMb5ZOz bdzdDmETZ6KhetxmEOL3HvORxrDap3z6oQ3qjnhJ/HeiKk32HVvsBMK30qjX/T3aCq ZJBAQmCU5paOA== Message-ID: <1e1a8772-d13c-43fc-b1b2-e9a0324e313e@technowledgy.de> Date: Sat, 22 Jun 2024 19:32:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: walther@technowledgy.de Subject: Re: Meson far from ready on Windows To: Andres Freund , Dave Page Cc: Nazir Bilal Yavuz , PostgreSQL Developers References: <20240618143850.nl67cwctsodmgfpi@awork3.anarazel.de> <20240618160845.gbqkiv4dbjghlp63@awork3.anarazel.de> <20240620205849.whd3434zoqqm2iy4@awork3.anarazel.de> <20240622163225.2tqid4xzpjt3lwiy@alap3.anarazel.de> Content-Language: en-US In-Reply-To: <20240622163225.2tqid4xzpjt3lwiy@alap3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: - List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund: > FWIW, dynamic linking has a noticeable overhead on other platforms too. A > non-dependencies-enabled postgres can do about 2x the connections-per-second > than a fully kitted out postgres can (basically due to more memory mapping > metadata being copied). But on windows the overhead is larger because so much > more happens for every new connections, including loading all dlls from > scratch. > > I suspect linking a few libraries statically would be quite worth it on > windows. On other platforms it'd be quite inadvisable to statically link > libraries, due to security updates, [...] That's not necessarily true. The nix package manager and thus NixOS track all dependencies for a piece of software. If any of the dependencies are updated, all dependents are rebuilt, too. So the security concern doesn't apply here. There is a "static overlay", which builds everything linked fully statically. Unfortunately, PostgreSQL doesn't build in that, so far. Lately, I have been looking into building at least libpq in that static overlay, via Meson. There are two related config options: -Ddefault_library=shared|static|both -Dprefer_static The first controls which libraries (libpq, ...) to build ourselves. The second controls linking, IIUC also against external dependencies. Maybe it would be a first step to support -Dprefer_static? Then this could be set on Windows. Best, Wolfgang