Re: Enhancing Memory Context Statistics Reporting - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Enhancing Memory Context Statistics Reporting
Date
Msg-id CAExHW5skNvp265od6XPs0O-RL3cwtgHW3N87Ob0+nByZ=_HzAA@mail.gmail.com
Whole thread Raw
In response to Re: Enhancing Memory Context Statistics Reporting  (Rahila Syed <rahilasyed90@gmail.com>)
Responses Re: Enhancing Memory Context Statistics Reporting
List pgsql-hackers
On Mon, Mar 17, 2025 at 1:23 PM Rahila Syed <rahilasyed90@gmail.com> wrote:
>
>>
>> v17-0002-Function-to-report-memory-context-statistics.patch
>>
>> +   if (procNumber == MyProcNumber)
>> +   {
>> +       ereport(WARNING,
>> +               errmsg("cannot return statistics for local backend"),
>> +               errhint("Use pg_backend_memory_contexts view instead."));
>> +       PG_RETURN_NULL();
>> +   }
>>
>> Is it worth it to keep this restriction?  Can we fetch info about
>> local memory context for the sake of generality?
>>
>
> I think that could be done, but using pg_backend_memory_context would
> be more efficient in this case.
>

I have raised a similar concern before. Having two separate functions
one for local backend and other for remote is going to be confusing.
We should have one function doing both and renamed appropriately.


--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Daniil Davydov
Date:
Subject: Re: Forbid to DROP temp tables of other sessions
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: long-standing data loss bug in initial sync of logical replication