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.96) (envelope-from ) id 1vd96i-00EWL1-0X for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jan 2026 15:36:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vd96h-008ltj-02 for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Jan 2026 15:36:27 +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.96) (envelope-from ) id 1vd96g-008ltb-25 for pgsql-hackers@lists.postgresql.org; Tue, 06 Jan 2026 15:36:27 +0000 Received: from relay7-d.mail.gandi.net ([2001:4b98:dc4:8::227]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vd96f-004YOI-09 for pgsql-hackers@lists.postgresql.org; Tue, 06 Jan 2026 15:36:26 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 76DCB4421A; Tue, 6 Jan 2026 15:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1767713776; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bmsCSHL8gmsAW2PLE5WYdzmgeBITWtBADAPKoTO3bwg=; b=GZ+Fr6fqtuQoAHI5VhCr0SL1Xu4ZcTmJdUJpUviGxpjWi8+OXvP4CphJJLGyGMvl6Pzvwe Q/LNDQU4TdG7A6HLChQdBkAZ29zlIYWI4P3q2mvYHdl/EkLwCK7OwBdbj3p8fCXwGQU37/ f0rCag2uC8wWXGfvn2FW8NTOSjGCEMdcXOWkmzsFMm2TQ8RJz/1+UPkadlW9/mgKNX/anX MKNPh+r/6dOpqsHmokGPaLX/ywn5GVEgB7rIHmYXKMm3C5c3HUshB67tVw14e3pUwqFsMZ w/o6yo67yWBUCBrZnQfVBFWNCHVH0zKhEaoM1hrRgSuAHORGzB7dPq4PEyN4IA== Message-ID: Date: Tue, 6 Jan 2026 16:36:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: failed NUMA pages inquiry status: Operation not permitted To: Jakub Wartak , Christoph Berg Cc: pgsql-hackers@lists.postgresql.org References: <54329add-59b6-4c08-96f0-a025a7804174@vondra.me> <4ff9578d-1de2-45c1-98c4-29caf99334ff@vondra.me> <183fe9ab-6010-4cca-b648-1deca332ce2a@vondra.me> Content-Language: en-US From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: tomas@vondra.me X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddutddtheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepvfhomhgrshcugghonhgurhgruceothhomhgrshesvhhonhgurhgrrdhmvgeqnecuggftrfgrthhtvghrnhepuedvvdeifefffeekudeggfdtieeglefggeduheffveeihefggfehgfdvudetffevnecukfhppeekiedrgeelrddvfedtrddvtdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepkeeirdegledrvdeftddrvddtiedphhgvlhhopegluddtrddufeejrddtrddvngdpmhgrihhlfhhrohhmpehtohhmrghssehvohhnughrrgdrmhgvpdhqihgupeejieffveeugeegvddutedpmhhouggvpehsmhhtphhouhhtpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepjhgrkhhusgdrfigrrhhtrghksegvnhhtvghrphhrihhsvggusgdrtghomhdprhgtphhtthhopehmhihonhesuggvsghirghnrdhorhhgpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/6/26 14:23, Jakub Wartak wrote: > On Mon, Jan 5, 2026 at 11:30 PM Christoph Berg wrote: >> >> Re: Tomas Vondra >>> I guess the only solution is to accept -2 as a possible value (unknown >>> node). But that makes regression testing harder, because it means the >>> output could change a lot ... > > Hi Tomas! That's pretty wild, nice find about that swapping s_b thing! > So just to confirm, that was reproduced outside containers/docker, > right? > Yes, this is a regular bare-metal Debian system. >> Or just not test that, or do something like >> >> select numa_node = -2 or numa_node between 0 and 1000 from pg_shmem_allocations_numa; > > Well, with the huge-pages it should be not swappable, so another idea > would be simply alter first line of src/test/regress/sql/numa.sql and > sql/pg_buffercache_numa.sql just like below: > - SELECT NOT(pg_numa_available()) AS skip_test \gset > + SELECT (pg_numa_available() is false OR > current_setting('huge_pages_status')::bool is false) as skip_test > \gset > > (I'm making assumption that there are buildfarm animals that > huge_pages enabled, no idea how to check that) > Yes, using huge pages makes this go away. I'm also even more sure it's about swap, because /proc/PID/smaps for postmaster tracks how much of the mapping is in swap, and with regular memory pages I get values like this for the main shmem segment: Swap: 90508 kB Swap: 275272 kB Swap: 135020 kB Swap: 116460 kB Swap: 102388 kB Swap: 93832 kB Swap: 155616 kB Swap: 165692 kB These are just values from "grep" while the pgbench is running. The instance has 16GB shared buffers, so 200MB is close to 1%. Not a huge part, but still ... I've always "known" shared buffers could be swapped out, but I've never realized it would affect cases like this one. I'm not a huge fan of fixing just the tests. Sure, the tests will pass, but what's the point of that if you then can't run this on production because it also fails (I mean, the pg_shmem_allocations_numa will fail)? I think it's clear we need to tweak this to handle -2 status. And then also adjust tests to accept non-deterministic results. regards -- Tomas Vondra