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

From Andres Freund
Subject Re: Add tracking of backend memory allocated to pg_stat_activity
Date
Msg-id 20221202171812.orgcfj3ma3elaz64@awork3.anarazel.de
Whole thread Raw
In response to Re: Add tracking of backend memory allocated to pg_stat_activity  (Reid Thompson <reid.thompson@crunchydata.com>)
Responses Re: Add tracking of backend memory allocated to pg_stat_activity  (Reid Thompson <reid.thompson@crunchydata.com>)
List pgsql-hackers
Hi,

On 2022-12-02 11:09:30 -0500, Reid Thompson wrote:
> It appears to me that Postmaster populates the local variable that
> *my_allocated_bytes points to. That allocation is passed to forked
> children, and if not zeroed out, will be double counted as part of
> the child allocation. Is this invalid?

I don't think we should count allocations made before backend_status.c has
been initialized.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Failed Assert in pgstat_assoc_relation
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_dump: Remove "blob" terminology