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 1vkW4S-00GR9i-2c for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 23:32:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkW4R-00BBCQ-35 for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jan 2026 23:32:36 +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 1vkW4R-00BBCG-1y for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 23:32:35 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkW4O-002TNY-0P for pgsql-hackers@lists.postgresql.org; Mon, 26 Jan 2026 23:32:34 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 811641F47A; Mon, 26 Jan 2026 23:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vondra.me; s=gm1; t=1769470349; 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=24nUZBhRBP9jCm2rkFTG7saSnB1y8G94TLf/LiJx5ZY=; b=pEVHqtokhMznnKU2kgoN2hDWeS3Sbg1WPZRaqUoPm5mQjtZI3bij1NLy6oHo16HnGxyGsX takedSsUT8Po39ZESroemo871UvdSIXcnIq33ewQraDqrYsp0VuE8+75jA33IYI/8KF4es xqrpAe7zoI7WOlS+tXoWuQn2IBJCMwCSN5tfRF0SbqFAb/SNS47m40xioa1+7KHeYdUsz+ Olb05Qr06WaVx3FaGXyGuC6E3XXX0PTFP8Mf2wJoJH49bNkoo8gDPcsbs9m0bCzteOXZWA FGuQUTXrWi+FjF8l8oGUyLlk3XJOqd+a60r0sDDKdkdHo8cVBb17lUPx4iasgg== Message-ID: <3b18ec96-5a45-4eaa-a98b-000927c9425b@vondra.me> Date: Tue, 27 Jan 2026 00:32:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: failed NUMA pages inquiry status: Operation not permitted From: Tomas Vondra To: Jakub Wartak Cc: Christoph Berg , 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 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-GND-Sasl: tomas@vondra.me X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduheekleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuhffvvehfjggtgfesthejredttddvjeenucfhrhhomhepvfhomhgrshcugghonhgurhgruceothhomhgrshesvhhonhgurhgrrdhmvgeqnecuggftrfgrthhtvghrnhephfeggfeljeevgfejteeuvdfhhfduteevlefguefgudelvdffjeelgeejhfetffeknecukfhppeegiedrudefhedrledvrddvtdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgeeirddufeehrdelvddrvddtiedphhgvlhhopegluddtrddufeejrddtrddukegnpdhmrghilhhfrhhomhepthhomhgrshesvhhonhgurhgrrdhmvgdpqhhiugepkeduudeigeduhfegjeetpdhmohguvgepshhmthhpohhuthdpnhgspghrtghpthhtohepfedprhgtphhtthhopehjrghkuhgsrdifrghrthgrkhesvghnthgvrhhprhhishgvuggsrdgtohhmpdhrtghpthhtohepmhihohhnseguvggsihgrnhdrohhrghdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-GND-State: clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/16/26 22:29, Tomas Vondra wrote: > Hi, > > Here's WIP fix for the root cause, i.e. handling status -2 in the two > views querying NUMA node for memory pages: > > * pg_shmem_allocations_numa > * pg_buffercache_numa > > We can't prevent -2 from happening - the kernel can move arbitrary pages > to swap, we have no control over it. So I think we need to handle -2 as > "unknown" node, instead of failing. The patch simply returns NULL > instead of the node, but in principle we might return some other value > (but IMHO we should not return the raw status, the -2 makes no sense in > our context, it's some internal kernel errno). > > The pg_buffercache_numa was not failing, it just returned the -2 status > verbatim. But I modified it to return NULL, for consistency. > > AFAIK this will fix the regression tests too - they only check COUNT(*), > not the actual values. > > I'm not sure if we need to mention this in the docs. It probably should > mention the column can be NULL, which means "unknown node". > Pushed and backpatched to 18. Hopefully that fixes this. regards -- Tomas Vondra