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 1vdPQc-000Aq2-2a for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 09:02:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdPQb-00D4Gt-10 for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Jan 2026 09:02:06 +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.96) (envelope-from ) id 1vdPQa-00D4Gl-38 for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 09:02:05 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vdPQY-0053Hb-0R for pgsql-hackers@lists.postgresql.org; Wed, 07 Jan 2026 09:02:04 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-59b25acdffbso1592689e87.2 for ; Wed, 07 Jan 2026 01:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1767776520; x=1768381320; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fAdBWT1CwwjzqqEc9FzlnlHNt3gAaizJKGKQ8jFIw0k=; b=I/JN8oQb+7MLpi8osQfyQ5YsDemm6I12xuVk3/zqRgHLyDR5yw+8+niJfJ0drWOmr8 6UGkhap4j0UktvJjpxuDOPf/uFxND6roAfnacLt55itY5vekFS6XwNvc9DUbfPiFy7gj slck1ZwbspDrBA9rId5R3dKyMXSH2t5IDotZvy7wEXqu5geAxIasGTC7Xtq7c3m9NihN hSQj3Px2DkyaZ5Iy9lnFafff7ZFvJKP01xFbbIRwPl0AS/0xOR7DAsyl3H2D8JuFXpVe G+XUODloUqIIDP2ttCKVDA6USQ/3PAn5CP9KtbbJJLa9t9wa2iFstSCiLF0Th5bvPAFG N/Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767776520; x=1768381320; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fAdBWT1CwwjzqqEc9FzlnlHNt3gAaizJKGKQ8jFIw0k=; b=CPfNb1kb3pJgNAyKT9DAqu0bYzIOYsqHNdK9dg8V/yfhL9u7yo49Qu/p3Q7mNIkX5d 1Kfah/dNU5arJRlALlyZq/qYrr2dNbfdbo1sxc2zFwoVuivd6iZjpa8AxUcr6LYru8PD WQ4/q8aUcGy+COkCs/mv+kdEFX8NVn/r1Uy+8PDjieEoXCM+XJIlHV4DknJ2WOykq1wa utWkWtEmuZI1TRvBUHkBVdQn0rggNYHsQSP9SObm05HKmn6ragky5jea6tC41BZ1e5tK F20HJe67CVuRZHNkEw/XGkGUVk6LjOKXZIHzY9MgToXnbH0RnwgXQM/mC9NuD6AM2yCh F/cg== X-Forwarded-Encrypted: i=1; AJvYcCWrM9uzJDSWy5SynpnfnKoRjtXInos8J10r1So9gzMBTn7P1D/GDMMXQ6VLkcyPjf94ZEWAgYrymwE3QIQV@lists.postgresql.org X-Gm-Message-State: AOJu0YzPAFf03O4IrtO5E6anIjc+btz+WCTS8QGdTPCM9whve+jxDpFx Ih6EFf1P+4L1cOUrWxU1YPPCyCDpFg2FAT3Fh2P2/7gl6ggStHo0ajdqxs9iCGNeLdQdUJ62KEQ o4aon6+UiXjdwrWYXdq1B8UvLsEbvD+EvZ+dv/s5Q X-Gm-Gg: AY/fxX6Q71efWu19FCCTMNqu3aXjjyZI1pHgzz4zXRu9WC1Ni8+hEgvVuSMJnqbOcQ2 W0NJ6s1vTdwQk7sHQzFwyDTWzdZ7eqSd0zFZyJY7K7Esm8dw1Y4Wt6zyBMt4DYt4BJHrbPpMYTZ SoDys3geMibx0r4Js3jdGhl1nx3Vw1ri3yqIFE7ybgAsWZudBkF0L3o3iSCd+uxlWxhIooePMtc TKedA0RBuj2gHLNDnsa8polZ1FFfR9Vyo6tnhQNqvEBYgdnje7V7+tjX5hOaLfwaYeGdg== X-Google-Smtp-Source: AGHT+IHhs2/B6qryM68JoDyb33PoFPkcYaKE9w74SaYoJP5hF1KsHXQDF86EuZy5PuER5OCpnRYHEDNljPX+cAGT7o4= X-Received: by 2002:a05:6512:690:b0:599:ce8:24a8 with SMTP id 2adb3069b0e04-59b6f037beamr511030e87.40.1767776519516; Wed, 07 Jan 2026 01:01:59 -0800 (PST) MIME-Version: 1.0 References: <54329add-59b6-4c08-96f0-a025a7804174@vondra.me> <4ff9578d-1de2-45c1-98c4-29caf99334ff@vondra.me> <183fe9ab-6010-4cca-b648-1deca332ce2a@vondra.me> In-Reply-To: From: Jakub Wartak Date: Wed, 7 Jan 2026 10:01:48 +0100 X-Gm-Features: AQt7F2r5etzRkayCPYswlUxMZjlRsIX9wUkkPfjxB7HwbT9wapmAlw0jF7U8q-s Message-ID: Subject: Re: failed NUMA pages inquiry status: Operation not permitted To: Tomas Vondra Cc: Christoph Berg , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Tomas, On Tue, Jan 6, 2026 at 4:36=E2=80=AFPM Tomas Vondra wrote= : [..] > I've always "known" shared buffers could be swapped out, but I've never r= ealized it would affect cases like this one. Same, I'm a little surprised by it, but it makes sense. In my old and more recent tests I've always reasoned the following way: NUMA (2+ sockets) --> probably a big production system --> huge_pages literally always enabled to avoid a variety of surprises (locks the region). Also this kind of reminds me of our previous past discussion about dividing shm allocations into smaller requests (potentially 4kB shm regions that are not huge_pages, so in theory swappable) [1]. > 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)? Well, You are probably right. > I think it's clear we need to tweak this to handle -2 status. And then > also adjust tests to accept non-deterministic results. The only question remains is, if we want to expose it to the user or not? We could a) silently ignore ENOENT in the back branches so that "size" won't contain it (well just change pg_get_shmem_allocations_numa()). It is not part of any NUMA node anyway. Well, maybe we could emit DEBUG1 or source code comment about such a fact that we think it may be swapped out. b) no sure is it a good idea, but in master we could expose it as a new column "swapped_out_size" (or change the current datatype of "numa" column from ::integer to something like ::text to allow outputting numa_node as integer, but also putting node=3D"swapped-out" too with proper size). Sounds like a new minor feature that would be able to tell the user that he has swapped out shm, and needs to really enable huge pages (?) -J. [1] - https://www.postgresql.org/message-id/jqg6jd32sw4s6gjkezauer372xrww7x= nupvrcsqkegh2uhv6vg%40ppiwoigzz6v4