On Wed, Nov 10, 2021, at 2:51 PM, Bharath Rupireddy wrote: > On Mon, Nov 1, 2021 at 12:30 AM Andres Freund <and...@anarazel.de> wrote: > > I'm not sure that the new log messages aren't sufficient. But if they > > aren't, it seems better to keep additional data in the stats system, and > > make them visible via views, rather than adding yet another place to > > keep stats. > > For this, the analytic tools/users whoever wants to know the recovery > stats, will have to make connections to the database which might eat > up the total connections. Instead, the postgres emitting the stats via > a hook will be more promising. Thoughts? A connection is the defacto interface for accessing Postgres statistics, no? The monitoring tools have already an interface to gather database metrics via SQL.
You are proposing to create a new way that all tools need to implement. It seems more effort than it's worth. +1 for storing this data into the stats system. -- Euler Taveira EDB https://www.enterprisedb.com/