Re: Add tracking of backend memory allocated to pg_stat_activity

From: Andres Freund <andres(at)anarazel(dot)de>
To: Reid Thompson <reid(dot)thompson(at)crunchydata(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>
Subject: Re: Add tracking of backend memory allocated to pg_stat_activity
Date: 2022-12-02 17:18:12
Message-ID: 20221202171812.orgcfj3ma3elaz64@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-12-02 17:26:29 Re: pg_dump: Remove "blob" terminology
Previous Message Tom Lane 2022-12-02 17:15:37 Re: Failed Assert in pgstat_assoc_relation