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 1vDlPW-00FMYu-Qd for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 15:14:58 +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 1vDlPU-00DX8D-Lr for pgsql-hackers@arkaria.postgresql.org; Tue, 28 Oct 2025 15:14:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDlPU-00DX85-8U for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 15:14:55 +0000 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vDlPQ-004E2L-1O for pgsql-hackers@lists.postgresql.org; Tue, 28 Oct 2025 15:14:54 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5D580441AC; Tue, 28 Oct 2025 15:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1761664484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hVU526QnzqbgAXxHe1M0CCAPoIuGjDBuBFrml/AnIYY=; b=p77DAMLxAuTSYaF447YG4ZJdyozmGLcFHdx6PvOOaKft5T9pKHVI0uiVm/mn2wYZC48kgW BsjDVv2rqZt9jEF5gfHDZ9GaUnUAwEKtiBi2qVRVgaV0sVpENC/fj1JE8sga+mhu6KVylE qPkc5cWhfcrCcu+HtX8arkpPz37T+NjRMJSj5MrfNrqu5i9JjhBRw+tFopFBz8KRAMh25E hacGp0hQKQwlvtvpwAztrhzbKD3/HGruhWKXdlat1B6SkmgYUGZPNl5r25+V29ro8GwTky M0OeZ70xvBLABL/nxv9RPoP7US8jOPcZh//vpgWyZmNGyHl3STOu/E0pKo3Psg== Content-Type: multipart/mixed; boundary="------------1rJD1N2wK3d2zYQf15aGiEbm" Message-ID: Date: Tue, 28 Oct 2025 16:14:43 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: failed NUMA pages inquiry status: Operation not permitted To: Christoph Berg Cc: Jakub Wartak , pgsql-hackers@lists.postgresql.org References: <7bbc582b-cc70-4a6f-bbf2-b5fd9b13a867@vondra.me> Content-Language: en-US From: Tomas Vondra In-Reply-To: X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduieduudekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtkfffgggfuffvvehfhfgjsehmtderredtvdejnecuhfhrohhmpefvohhmrghsucggohhnughrrgcuoehtohhmrghssehvohhnughrrgdrmhgvqeenucggtffrrghtthgvrhhnpeekudfhgfelgefhjedtheelhffgudegjedufefftedutdehlefhjeeftdevieefieenucfkphepkeeirdegledrvdeftddrvddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeekiedrgeelrddvfedtrddvtdeipdhhvghloheplgdutddrudefjedrtddrvdgnpdhmrghilhhfrhhomhepthhomhgrshesvhhonhgurhgrrdhmvgdpnhgspghrtghpthhtohepfedprhgtphhtthhopehmhihonhesuggvsghirghnrdhorhhgpdhrtghpthhtohepjhgrkhhusgdrfigrrhhtrghksegvnhhtvghrphhrihhsvggusgdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-GND-Sasl: tomas@vondra.me List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------1rJD1N2wK3d2zYQf15aGiEbm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/16/25 17:19, Christoph Berg wrote: >> So maybe all that's needed is a get_mempolicy() call in >> pg_numa_available() ? > > ... > > So maybe PG should implement numa_available itself like that. (Or > accept the output difference so the regression tests are passing.) > I'm not sure which of those options is better. I'm a bit worried just accepting the alternative output would hide some failures in the future (although it's a low risk). So I'm leaning to adjust pg_numa_init() to also check EPERM, per the attached patch. It still calls numa_available(), so that we don't silently miss future libnuma changes. Can you check this makes it work inside the docker container? regards -- Tomas Vondra --------------1rJD1N2wK3d2zYQf15aGiEbm Content-Type: text/x-patch; charset=UTF-8; name="0001-Handle-EPERM-in-pg_numa_init.patch" Content-Disposition: attachment; filename="0001-Handle-EPERM-in-pg_numa_init.patch" Content-Transfer-Encoding: base64 RnJvbSBiNTU1MGFlNmY1YmFjM2RlMTRhODZhMGY3Njc3ZGI3NTViMjdhYTczIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBUb21hcyBWb25kcmEgPHRvbWFzQHZvbmRyYS5tZT4K RGF0ZTogVHVlLCAyOCBPY3QgMjAyNSAxNjowMDowNyArMDEwMApTdWJqZWN0OiBbUEFUQ0hd IEhhbmRsZSBFUEVSTSBpbiBwZ19udW1hX2luaXQKCi0tLQogc3JjL3BvcnQvcGdfbnVtYS5j IHwgMTIgKysrKysrKysrKystCiAxIGZpbGUgY2hhbmdlZCwgMTEgaW5zZXJ0aW9ucygrKSwg MSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL3NyYy9wb3J0L3BnX251bWEuYyBiL3NyYy9w b3J0L3BnX251bWEuYwppbmRleCAzMzY4YTQzYTMzOC4uNTQwYWRhM2Y4ZWYgMTAwNjQ0Ci0t LSBhL3NyYy9wb3J0L3BnX251bW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