Re: Add tracking of backend memory allocated to pg_stat_activity - Mailing list pgsql-hackers

From Reid Thompson
Subject Re: Add tracking of backend memory allocated to pg_stat_activity
Date
Msg-id 19e8f6bc361f5ce8da6cbf67e7ea4a2296ae4a47.camel@crunchydata.com
Whole thread Raw
In response to Re: Add tracking of backend memory allocated to pg_stat_activity  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Wed, 2022-08-31 at 12:05 -0500, Justin Pryzby wrote:
> > +  proargmodes =>
> > '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}'
> > ,
>
> In the past, there was concern about making pg_stat_activity wider by
> adding information that's less-essential than what's been there for
> years.  This is only an int64, so it's not "wide", but I wonder if
> there's another way to expose this information?  Like adding backends
> to
> pg_get_backend_memory_contexts() , maybe with another view on top of

I will take a look at pg_get_backend_memory_contexts. I will also look
at the other suggestions in the thread.

> +                * shown allocated in pgstat_activity when the
>
> pg_stat

Corrected,

> > replacing the * old
>
> wrapping caused extraneous stars

Corrected

> > here asit's
>
> as it's

Corrected

> errmsg() doesn't require the outside paranthesis since a couple years
> ago.

Corrected

> > > mem_allocated cast to
> add a comma before "cast" ?

Corrected

Patch with the corrections attached

--
Reid Thompson
Senior Software Engineer
Crunchy Data, Inc.

reid.thompson@crunchydata.com
www.crunchydata.com


--
Reid Thompson
Senior Software Engineer
Crunchy Data, Inc.

reid.thompson@crunchydata.com
www.crunchydata.com

--
Reid Thompson
Senior Software Engineer
Crunchy Data, Inc.

reid.thompson@crunchydata.com
www.crunchydata.com

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can we avoid chdir'ing in resolve_symlinks() ?
Next
From: Reid Thompson
Date:
Subject: Re: Add the ability to limit the amount of memory that can be allocated to backends.