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 1v6aBL-006ob5-Oc for pgsql-general@arkaria.postgresql.org; Wed, 08 Oct 2025 19:50:39 +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 1v6aBJ-00CkkY-Ak for pgsql-general@arkaria.postgresql.org; Wed, 08 Oct 2025 19:50:38 +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 1v6aBI-00CkkQ-SG for pgsql-general@lists.postgresql.org; Wed, 08 Oct 2025 19:50:37 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6aBG-000j07-2V for pgsql-general@lists.postgresql.org; Wed, 08 Oct 2025 19:50:36 +0000 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-b609a32a9b6so93547a12.2 for ; Wed, 08 Oct 2025 12:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759953035; x=1760557835; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FCJZIAthTs10i5TPAVLayWES+qd3nWiu3jVErMJJ/Os=; b=kg+NUIgR79px973rpcrBke6c5Fjof3eTq1SqO9ebZ8mJWUH5gE7njNqDnkh7+K3RyT VpSkZqQSMdsbLFwsRdoTZ9AHw1uS1JiyK2Ef+/oovH0mCyBKj9Y7VbK8LWbSnUNHXUAu pjHkajnFATtfJY25dFUJe9AtX25x0WCLMfDniE9UMBzAtHbFJVFtJ+QxCuKSimUzbZuq 8cOToLZ0l2cY2mz5T4YNXjqPvCu6K2jqF/0aPJps42OF8TlrS2KuQ3NXurFq6dfDMNVo ehn0q652Bd6cKY5g1xSA04z1QFPIspRXbNj1kf3CJDEBb/RA4dKecKVsKVCKQ8O+FU/n 5okg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759953035; x=1760557835; h=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=FCJZIAthTs10i5TPAVLayWES+qd3nWiu3jVErMJJ/Os=; b=VJyPhxlc6TYBR421K5hNqfnoWNM5abLhdtyHsg9W+0JEipSklrq64FiZKDIHmj9MGd M/gpVN8YVX+1SB/VKcgFncxQOR6lGu/7eSipEnhnakD96MDilHhbcjF3R00L97JzMrQN ziRte/FKeNA/f3RNGMMdgdvnwBglYRgvPSAbr6dN71hqyO4GXyeLfTLR/GpYEaFaPGaU R4k6s+6AOiVQzdW8H5EqzxKm3dD9L4xanyQu0mb+bM2MJqjk34mSpfvJ2BaRSOovSnuk apaZpwinyV8r6ps2RE9NpiOEoYgJCyJ6mGq8TIRZ/00k0iNniC4vO7Xr70q+VqFhVbkd dtmA== X-Gm-Message-State: AOJu0YwqXatg0LXqTGG9Np3340SlIVLdbaWw1pFcDq+iLNucvsV2p+Kf Eir2sM6ew9bqe04eFPtBd0v4Hp7VGytYAytRAVNKYqCoKI0Tcph1J2BBYg8kRxC54xRmSV34fYa 2XFRw96UGXJPAPxmDXkI+ebGNvN0/kJU= X-Gm-Gg: ASbGnctAgA90P1s6u8qz7zjeNgt/KGrwaQiRK8lPCIT68oqipjxCT+KeDaKZtPleFeJ /AYFj4lrxj+OLgSYMrv63yfu+jqUueKVoFTkplT8R/y2eLiJCXYhNTGn0OkxmDm133jrmaDTGzj 1JXAyMOIuLZkGK4Dx/hyXB7sJP0E2jPffPBF/E+OieDMvbhRVGQDx1Ou6M2zKbtTanKJCVPOlfo B7/rVWiGViYlzo7LYECDwv2nY9w+MGs29kBT7KkDYe3YSNT8kKOJ7EgowYC+kxAZkl21vpj X-Google-Smtp-Source: AGHT+IG+2/NoitT/PAYMU8xZ7psXrIfLJdVfK1M+9vrtW8AE5kvv5Ho9Xx4H5UqHGcswORPKL2EB7qwXrbJbZa6rS4w= X-Received: by 2002:a17:902:cf41:b0:267:776b:a315 with SMTP id d9443c01a7336-290272c2019mr60262815ad.32.1759953034792; Wed, 08 Oct 2025 12:50:34 -0700 (PDT) MIME-Version: 1.0 References: <9f175444-6bfc-4c6e-a609-e552d85c45a1@aklaver.com> In-Reply-To: From: sud Date: Thu, 9 Oct 2025 01:20:22 +0530 X-Gm-Features: AS18NWAvBvzQvIF4CgWzYWjn1-727OTjul6Tk7Lqgykdvd_Kk7DMKzv2kFrmeLw Message-ID: Subject: Re: Alerting on memory use and instance crash To: Ron Johnson Cc: pgsql-general Content-Type: multipart/alternative; boundary="00000000000075d4270640aafff6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000075d4270640aafff6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you. The other question I had was , are there any pg_* views using which, we are able to see which session/connection is using the highest amount of memory? I don't see any such columns in pg_stats_activity. On Thu, Oct 9, 2025 at 12:37=E2=80=AFAM Ron Johnson wrote: > On Wed, Oct 8, 2025 at 2:58=E2=80=AFPM sud wrote: > [snip] > >> Do you mean in normal Postgres it's alway a single instance/memory and >> single storage attached? then I also do not see any such cluster level >> views in aws aurora postgres too? >> > > Yup. > > >> Pardon if it's a silly one to ask. >> > > A Google for "what's the difference between Oracle and Postgresql" _might= _ > help. I've never done that, so don't know what you'll find. > > As far as how Aurora works... you need to ask AWS. It's been too heavily > modified for a list dedicated to pure/unmodified Postgresql to help. > > >> On Wed, Oct 8, 2025 at 9:52=E2=80=AFPM Adrian Klaver >> wrote: >> >>> On 10/8/25 08:42, sud wrote: >>> > Hi Experts, >>> > >>> > It's postgres version 16. I have two questions on alerting as below. >>> > >>> > 1)If we want to have alerting on any node/instance that gets crashed >>> :- >>> > In other databases like Oracle the catalog Views like "GV$Instance" >>> used >>> > to give information on whether the instances are currently active/dow= n >>> > or not. But in postgres it seems all the pg_* views are instance >>> > specific and are not showing information on the global/cluster level >>> but >>> > are restricted to instance level only. So is there any other way to >>> > query the pg_* views to have alerts on the specific instance crash? >>> >>> 1) When you say instance do you mean database? >>> >>> 2) Not all system tables/views are database only. >>> >>> For instance: >>> https://www.postgresql.org/docs/current/catalog-pg-database.html >>> https://www.postgresql.org/docs/current/catalog-pg-auth-members.html >>> https://www.postgresql.org/docs/current/catalog-pg-authid.html >>> https://www.postgresql.org/docs/current/view-pg-roles.html >>> >>> >>> > 2)Is there a way to fetch the data from pg_* view to highlight the >>> > specific connection/session/sqls which is using high memory in >>> postgres? >>> > >>> > Appreciate your guidance. >>> > >>> > Regards >>> > Sud >>> >>> >>> -- >>> Adrian Klaver >>> adrian.klaver@aklaver.com >>> >> > > -- > Death to , and butter sauce. > Don't boil me, I'm still alive. > lobster! > --00000000000075d4270640aafff6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you.=C2=A0

The other question I h= ad was , are there any pg_* views using which, we are able to see which ses= sion/connection is using the highest amount of memory? I don't=C2=A0see= any such columns=C2=A0in pg_stats_activity.

On = Thu, Oct 9, 2025 at 12:37=E2=80=AFAM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
On Wed, Oct 8, 2025 at 2:58=E2=80=AFPM sud <suds1434@gmail.com> wrote:
[snip]=C2=A0
Do you mean in normal Postgres it= 's alway a single instance/memory and single storage attached? then I a= lso do not see any such cluster level views in aws aurora postgres too?

Yup.
=C2=A0
Pardon if= it's a silly one to ask.=C2=A0

=
A Google for "what's the difference between Oracle and Postgr= esql" _might_ help.=C2=A0 I've never done that, so don't know = what you'll find.

As far as how Aurora works..= . you need to ask AWS.=C2=A0 It's been too heavily modified for a list = dedicated to pure/unmodified Postgresql to help.
=C2=A0
On Wed,= Oct 8, 2025 at 9:52=E2=80=AFPM Adrian Klaver <adrian.klaver@aklaver.com> wro= te:
On 10/8/25 08:42, sud wrote:
> Hi Experts,
>
> It's postgres version 16. I have two questions on alerting as belo= w.
>
> 1)If we want to have alerting on any node/instance that gets crashed := -
> In other databases like Oracle the catalog Views like "GV$Instanc= e" used
> to give information on whether the instances are currently active/down=
> or not. But in postgres it seems all the pg_* views are instance
> specific and are not showing information on the global/cluster level b= ut
> are restricted to instance level only. So is there any other way to > query the pg_* views to have=C2=A0alerts on the specific instance cras= h?

1) When you say instance do you mean database?

2) Not all system tables/views are database only.

For instance:
https://www.postgresql.org/docs/curr= ent/catalog-pg-database.html
https://www.postgresql.org/docs/= current/catalog-pg-auth-members.html
https://www.postgresql.org/docs/curren= t/catalog-pg-authid.html
https://www.postgresql.org/docs/current/v= iew-pg-roles.html


> 2)Is there a way to fetch the data from pg_* view to highlight the > specific connection/session/sqls which is using high memory in postgre= s?
>
> Appreciate your guidance.
>
> Regards
> Sud


--
Adrian Klaver
adrian.klave= r@aklaver.com


--
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobs= ter!
--00000000000075d4270640aafff6--