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 1u2rzy-00755X-Uf for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Apr 2025 13:31:19 +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 1u2rzw-00Bmjh-Js for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Apr 2025 13:31:16 +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 1u2rzw-00BmjG-8K for pgsql-hackers@lists.postgresql.org; Thu, 10 Apr 2025 13:31:16 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u2rzu-00449q-1R for pgsql-hackers@lists.postgresql.org; Thu, 10 Apr 2025 13:31:15 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-ac2a9a74d9cso154788966b.1 for ; Thu, 10 Apr 2025 06:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744291872; x=1744896672; 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=p5llOPx+j+JN2pgMNNviWyyRW8w74juM2PeSr/J5020=; b=UzGFrWUQnIA3j26XQOqu3EFZjyqVv/4il448RBGaGtgBPkrZycz0wsj4QkhwRO/66J SeQV2vvL0wHQBs8LOxzlMVzF5rwEMlvJnnHPpWzUdUkzSGKWP9dKtc1tZcVmg5VaI7Xc aOgP19DTeWynr7GogII3uk7OvuQp3cd9UOt+pBtuY1i+2j5NudbeL0I95Axj+SFY7Z6U zfonxy4VK9Yl78IhHMgOiBO9cA7RG4RD02soI6uiol20nM2QpWpYJU2WAHl35Cpxn5mX rBKAIUCrF5FnWEksf+ZRuQ/vW1/Vm68otbbGhT4V1Z2kkf/XNzB1LdKot9e9U99wqD4m rF4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744291872; x=1744896672; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p5llOPx+j+JN2pgMNNviWyyRW8w74juM2PeSr/J5020=; b=WsdHxYRYEtNlsaFCWJjE6Ow6Y1JaYbTYjAZk/tq9lYVuDoV5JYZlcgPTNDtJUIrxF4 ctssMt+pxPgqtSQmxq5V3gGzE2vTbOqGEWQJARp1bD4wsK9v/efP7cyBmnNWaLQ0JwgG PhEhiERx/GrZJOwmU2LAfKMkcCW2IfEH7sH9mVq8sg9l6qxjumnL0sueKxPsSXN+C4ub qtp4ivunA6GB3A7zojT6WDHEIFqgqkTc6miRPv3+KlvQ7WyR3DJrlvffnVFZqrGdiPtw WPi2UieL0tb/g3Wc5l9A7yHNWnvHDQduZ3ImGlwAu6b6dGZxUzKlAa/jlnKTTaZ4bfUy TffQ== X-Gm-Message-State: AOJu0Yz3IuD8ASzvgcgmKADsqF466ku46orIFcd3tDBnJ8wyQP82C7vC 3SziOekqATquXeCWvtmoZodwsgmkl9BOXH+emfhXeMKMnHqBu6ZwyQMhAeyimdAfYu1sOxnpkhG a0wBRsk4/x1pp4UgZrpHhXcXi9WU= X-Gm-Gg: ASbGnctpQ1ZHc8tXBlYLX409UVKSjYb5Q/CDNlHRXK7C/gB4LzgFegbP2xPljhXqL7P ZLXHajLOE3ysOHFucUtb1DPrZQVk3SlyisNEWD61jQYMGRoKFpo45WSfrc0xMpnjQkukz8ZI9m0 uGKjpiAhzUIxl0F6ta1ZalUA== X-Google-Smtp-Source: AGHT+IE0HoiiEkvFYvf3TGhFyJpUHgyLPrsTxQBCOyC5DlvwvvsdaxqHoQmr10lLACFjkKZTZ2uaFWMgUcewKDC6rLI= X-Received: by 2002:a17:907:94c8:b0:ac7:95b0:d0fb with SMTP id a640c23a62f3a-acabd20e485mr207558166b.34.1744291871833; Thu, 10 Apr 2025 06:31:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Thu, 10 Apr 2025 09:31:00 -0400 X-Gm-Features: ATxdqUFwbA61nUhOpPwgYB4hmqsvJvaXF9rxsCKerw0XH0bFdCCJfYBkNJkvGwg Message-ID: Subject: Re: pgsql: Add function to get memory context stats for processes To: Daniel Gustafsson Cc: PostgreSQL Hackers , Rahila Syed 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 On Tue, Apr 8, 2025 at 5:10=E2=80=AFAM Daniel Gustafsson wrote: > Add function to get memory context stats for processes Apologies if this has already been discussed, but what is the argument that it is safe to do everything in ProcessGetMemoryContextInterrupt() at an arbitrary CHECK_FOR_INTERRUPTS() call? We have CHECK_FOR_INTERRUPTS() calls in some quite low-level places, such as walkdir() and copydir(). I don't think there's any guarantee that it's safe to perform DSA operations at an arbitrary place where CHECK_FOR_INTERRUPTS() is called, and I'm not even quite sure that it's safe to assume that the local memory-context tree is in a consistent state when CHECK_FOR_INTERRUPTS() is called. If there is some existing discussion of this that I should read, please point me in the right direction; I didn't see anything in a quick look through the commit. Thanks, --=20 Robert Haas EDB: http://www.enterprisedb.com