Re: shared-memory based stats collector - v70

From: Andres Freund <andres(at)anarazel(dot)de>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: melanieplageman(at)gmail(dot)com, pryzby(at)telsasoft(dot)com, thomas(dot)munro(at)gmail(dot)com, david(dot)g(dot)johnston(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: shared-memory based stats collector - v70
Date: 2022-04-08 04:37:09
Message-ID: 20220408043709.uml3s4ycrexi7bbq@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-04-07 20:59:21 -0700, Andres Freund wrote:
>
> <para>
> Cumulative statistics are collected in shared memory. Every
> <productname>PostgreSQL</productname> process collects statistics locally
> then updates the shared data at appropriate intervals. When a server,
> including a physical replica, shuts down cleanly, a permanent copy of the
> statistics data is stored in the <filename>pg_stat</filename> subdirectory,
> so that statistics can be retained across server restarts. In contrast,
> when starting from an unclean shutdown (e.g., after an immediate shutdown,
> a server crash, starting from a base backup, and point-in-time recovery),
> all statistics counters are reset.
> </para>
> ...
> <para>
> The cumulative statistics system is active during recovery. All scans,
> reads, blocks, index usage, etc., will be recorded normally on the
> standby. However, WAL replay will not increment relation and database
> specific counters. I.e. replay will not increment pg_stat_all_tables
> columns (like n_tup_ins), nor will reads or writes performed by the
> startup process be tracked in the pg_statio views, nor will associated
> pg_stat_database columns be incremented.
> </para>

I went with these for now. My guess is that there's further improvements in
them, and in surrounding areas...

With that, I'll close this CF entry. It's been a while.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-04-08 04:37:38 Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN
Previous Message Michael Paquier 2022-04-08 04:35:02 Re: Windows now has fdatasync()