Re: per backend WAL statistics - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: per backend WAL statistics
Date
Msg-id Z8GqeC_w7pbWhQQf@paquier.xyz
Whole thread Raw
In response to Re: per backend WAL statistics  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
List pgsql-hackers
On Fri, Feb 28, 2025 at 09:26:08AM +0000, Bertrand Drouvot wrote:
> Also attaching the patch I mentioned up-thread to address some of Rahila's
> comments ([1]): It adds a AuxiliaryPidGetProc() call in pgstat_fetch_stat_backend_by_pid()
> and pg_stat_reset_backend_stats(). I think that fully makes sense since a051e71e28a
> modified pgstat_tracks_backend_bktype() for B_WAL_RECEIVER, B_WAL_SUMMARIZER
> and B_WAL_WRITER.

Oops, yes, you are right on this one.  This change should have
happened earlier.  The flow you are using in 0002 is similar to
pg_log_backend_memory_contexts(), which looks OK at quick glance.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Yura Sokolov
Date:
Subject: Re: Get rid of WALBufMappingLock
Next
From: Sagar Shedge
Date:
Subject: Re: Extend postgres_fdw_get_connections to return remote backend pid