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 1uUf9y-006g8e-Mq for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jun 2025 05:28:30 +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 1uUf9w-007t5p-E4 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jun 2025 05:28:29 +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 1uUf9w-007t5h-4N for pgsql-hackers@lists.postgresql.org; Thu, 26 Jun 2025 05:28:28 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uUf9u-0042x8-2o for pgsql-hackers@lists.postgresql.org; Thu, 26 Jun 2025 05:28:27 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3a575a988f9so281225f8f.0 for ; Wed, 25 Jun 2025 22:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750915704; x=1751520504; 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=9gw7l1LoesD5O250G91QGtn8FhjXjJlCPLeqGt/MJ+s=; b=IhBkA23pG85k0xFPzoa41nqWoj74lrOmphKxG4PTbw38GdX3pAta9vU+P0MD6LsfZF JsLi3illbZEdKUbwCXPZvfZGODmjdNRSHDeYXgE8TuhrYwx9VnKw0h/69AVLIPe87oqA RN81FhPcvi3UGUYV3OMmxQngqSegINglj/JbjUM8ZurF0PKP8eNrs6C02BYqyUrAYzYQ v9C/J6CR82CE4+FsHP34Rct9iZqhXWJam0MsW5fGxsyBPX4egpe0nTR9Hubqbjpsedbu M0T0g/xQXnKucuIkdQqNDGSoW1lvqTr2j8UviR14fMc1w7NM9Cor1f7zwUnviHGF0k4C VHkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750915704; x=1751520504; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9gw7l1LoesD5O250G91QGtn8FhjXjJlCPLeqGt/MJ+s=; b=kntYr3CW5ksJ8UGl3AOTg84/wMUuwjUS5lOrkP+TAEyVJD23Qh5VjIXtqxxjazpLPF Xc0u3Bu6qlt4qTJqCAQ4wxV9cNlTnbcVxckyIJCjJZ1e8zFJE+6irMZ8V/x3P/31kuP3 O3MvlJ7K1XUVWEoJtRA8jah1RqZZq2TygUXwifRfLtbgakBp6CxvA5hYEPkrmQQKVe5c Bf79fSADxf0DhyPqhb1w8TSCPbz6M+w3Vq3ClX9fuc8/9AzaXsUc3FY5F8DsqB/elunh 38p+OfZgN4YukLgg6vLcyBvtSiekYX5nN78sA+gPYp+DWPbMZTBr19DtVDp1Pnbwjt8C BG6A== X-Forwarded-Encrypted: i=1; AJvYcCVqQhiLWhNLpyNDA9jCLUUdwehl6GgMQn/+MsiaICpXdeWJmLeq0lNIhfSXhdkH95c82aOHRGjQp/K2AOeT@lists.postgresql.org X-Gm-Message-State: AOJu0YxXA4cUmlJPgfnw6/Rlhz/hmYs3MyzVwRQCIVokGAiMOUK0fxNY ezf+zqX7sXRylrjmhws2CCBuxpqehj2WO3jDxwQbkNbmYHb6p+dQ61qM X-Gm-Gg: ASbGncuW1ixac9Qcy2edaal5k0CZ4Ry1QYpf+umLZPWVPyHwTWVDOmC4vKzSEIwGzKX BODaDAi12YC+3kel/DioKNDQ75K4r+uWIGCI6jV3hMlQ/SDht1BUcg0oZqUQacVNkcnUFGSb7Pc 6FT0IrRGbv0pXdXznPQqXP5/GMaIhOuBB6tjHwM4xDA41g4z2A6sa7QsmoxM+0gKSbxOOxLZElc 48GnldPCdfTDbhbQmRM1coC962tKgXSJvwC8ag46TlMpaFSPPqpfFuj5LJQUuzmWBd6iWzWZyE/ 9VtXKhjUVQW6ke6UsU2OFZ1cHIitdbcfqnSLO6ns5FGoHPHwzL+8p1QbHqVJhbxSO2PvfXiahj5 oxP3Cv9Jd5Cfv5RVYuCcR70mgFzUeHgF1mhNqFF0kPGFSIJwd3JytAUVfD496yFfFFpkbuT/L9W 6wQ+YjycZbzaWBHfRbrGJclnA6cnum X-Google-Smtp-Source: AGHT+IEdH4S7TkOgUV2lGPI1a19UVngsiDqFKKhujaPggRsjfdGPcv8szMIrFy+0EyvYMCmoDcsCXQ== X-Received: by 2002:a05:6000:2186:b0:3a3:6991:dcbb with SMTP id ffacd0b85a97d-3a6ed61fcd6mr2929713f8f.12.1750915703741; Wed, 25 Jun 2025 22:28:23 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-181-182.eu-west-3.compute.amazonaws.com. [15.237.181.182]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a6e810010fsm6401477f8f.74.2025.06.25.22.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jun 2025 22:28:23 -0700 (PDT) Date: Thu, 26 Jun 2025 05:28:22 +0000 From: Bertrand Drouvot To: Christoph Berg Cc: Tomas Vondra , Andres Freund , Tomas Vondra , pgsql-hackers@lists.postgresql.org Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Wed, Jun 25, 2025 at 11:00:38AM +0200, Christoph Berg wrote: > Re: Bertrand Drouvot > > +/* > > + * Work around Linux kernel bug in 32-bit compat mode: do_pages_stat() has > > + * incorrect pointer arithmetic for more than DO_PAGES_STAT_CHUNK_NR pages. > > + */ > > +#if SIZEOF_SIZE_T == 4 > > I was also missing it in my suggested patch draft, but this should > probably include #ifdef __linux__. I'm not sure because the workaround is after this part of the code in pg_numa.c: " /* * At this point we provide support only for Linux thanks to libnuma, but in * future support for other platforms e.g. Win32 or FreeBSD might be possible * too. For Win32 NUMA APIs see * https://learn.microsoft.com/en-us/windows/win32/procthread/numa-support */ #ifdef USE_LIBNUMA " So I guess that the "#ifdef __linux__" would have to be at a higher level anyway (should we support NUMA on more than Linux in the future). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com