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 1vkcgU-000Ejl-2D for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jan 2026 06:36:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkcgT-00CCmF-1w for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jan 2026 06:36:17 +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 1vkcgT-00CCm6-0j for pgsql-hackers@lists.postgresql.org; Tue, 27 Jan 2026 06:36:17 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vkcgR-002WGB-0A for pgsql-hackers@lists.postgresql.org; Tue, 27 Jan 2026 06:36:16 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-48068ed1eccso2665645e9.2 for ; Mon, 26 Jan 2026 22:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769495773; x=1770100573; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QdTF7AzwIwu6tOtkQA7SKT5yhtaE85amVNmGlsu1I7I=; b=Io/aayxIhkiRrhXgT+0LfCng7yHL6IUU2J80pbI84sxJhtPI6BfC5JTdjR3iMTjdyv AZnvzs8b8hJleNArfNvBKGX9gxFNTe/ZhTWLaAUvXSgzXo7s70jNYD/aQpMAzLUgfOsU AWyhP+7C3vqI5pE7NWkPxO2VdCRSknceOhG1NDhE2fsk4oO1wXTdn7S55oPmxmEsIUJ3 z0x0zOPUDqLoxzbdlUjbyzg+DJvaR46rE9mXF2KXpJpCAN3VEoMtkf/pjImY+D8QYPsV uaac8/0+jfWJ2HnC+Qct+gCzitI1u02KHGKNknPjscEqtQ10rRg/XRqlr2VDuaMdQdkT +68w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769495773; x=1770100573; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QdTF7AzwIwu6tOtkQA7SKT5yhtaE85amVNmGlsu1I7I=; b=d4feG9RXWnWLxhsLYTHgj2dC5vzm1rOAN5sWv2H+rghHJE9U/qolbc9+kn9lsQ9jMm G2FmzhLZIc556IOFgyO8Q+f5UR5sIfbbzfvN10H3IWWrwlfY1KWLcRLtsiPUY8QNGiQb 5aMPqPfUjynUop0CQjsuDKfSULb/oJZREyLSVfEHA8L2RMUGqBg6UJzWUF3ITy890Gvb LjECc4cxF/zJPtIWyUR13emDV8dLCjgm24PzN58vYo/HgO0Whjx2OwwoUIcZbcaUZJxk khiBgjPa1uZ8fe1XNHdz1FyQnvGF3dujqdc3yBB3Yw8hGzO3A2VabbWUZ8OQd2bvO2vB yJfw== X-Forwarded-Encrypted: i=1; AJvYcCUD1nvXvacgYwP59mVB7mBlkdUdKcF+VNZkz1tzhkz0dI5QMPmqfCEwI0Xv7BLqP46K0A2oIkakemoPalAD@lists.postgresql.org X-Gm-Message-State: AOJu0YzFKg4oLa/+rmALmD8jz+5Ss2NxPhdinJJIUBrG0NCGm1i5DkEW jXdQDTMdknbZDuJt+YZj+L6FAsisAJyxxLH+H9cVIDp1Ng/QMRKcffQY X-Gm-Gg: AZuq6aII8KaeCC806BR51LtD0ti6gra0FOjbEAApgRNn//Gxw1/ULSBi0d3uj+WyfI5 E4k/3MgSX7vHgvnUVV3OHj46s1qAKqzriHd5/XO5cz7INvHlY69vXyrKGKDSjTo4H+ydVwdmdtx Wx2JlXoFdCv+eu2U0M9zvUxPVvF9/5rCvhUfncVSjG0N5j2byVt1imcurw7U2OCuk1eHg6wa0Fy oT0alhQegdl+KHpRsjjCxjN8p090uecKE6q6h1EfV+sVPod2QOy+5XtSL2+Loup2KaE5sKk0FBJ 8vrLwZSM/HUBt+6ro7GhKakvP2jMa0oBIUhVl5l6pH8D6I3H/TT5doAyXh8cCllc3oEglFTz6Wb Dc2rbItw5X2odiRhe28/YGsMwyIPJiyMqn6mxUpKll2QGcbcAx+9KS5kCODOIW+KTFD1T0xt/g6 K7/hhWh5tphbnmMS1W0fg08ZKcM3Uq+ZoxMIHyDkXDIYl5iLf26sVsrz7pHnEfZhUnvR2e0c3En o9gGrEzs9fbSyTSMR/iB+buYmaaKmCL0U1b/Guqk+oRug== X-Received: by 2002:a05:600c:190a:b0:47d:3690:7490 with SMTP id 5b1f17b1804b1-48069c1c208mr7171195e9.9.1769495773329; Mon, 26 Jan 2026 22:36:13 -0800 (PST) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48066c10dbasm40505295e9.15.2026.01.26.22.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jan 2026 22:36:12 -0800 (PST) Date: Tue, 27 Jan 2026 06:36:11 +0000 From: Bertrand Drouvot To: Tomas Vondra Cc: Jakub Wartak , Christoph Berg , pgsql-hackers@lists.postgresql.org Subject: Re: failed NUMA pages inquiry status: Operation not permitted Message-ID: References: <183fe9ab-6010-4cca-b648-1deca332ce2a@vondra.me> <3b18ec96-5a45-4eaa-a98b-000927c9425b@vondra.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3b18ec96-5a45-4eaa-a98b-000927c9425b@vondra.me> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Tue, Jan 27, 2026 at 12:32:28AM +0100, Tomas Vondra wrote: > 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. Should 09c37015d49665c52ae7eabd5852af36851aede4 be added to .git-blame-ignore-revs? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com