Re: shared-memory based stats collector - Mailing list pgsql-hackers

From Andres Freund
Subject Re: shared-memory based stats collector
Date
Msg-id 20220303021600.hs34ghqcw6zcokdh@alap3.anarazel.de
Whole thread Raw
In response to Re: shared-memory based stats collector  (Andres Freund <andres@anarazel.de>)
Responses Re: shared-memory based stats collector  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Re: shared-memory based stats collector - v66  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

On 2021-07-26 18:27:54 -0700, Andres Freund wrote:
> I had intended to post a rebase by now. But while I did mostly finish
> that (see [1]) I unfortunately encountered a new issue around
> partitioned tables, see [2]. Currently I'm hoping for a few thoughts on
> that thread about the best way to address the issues.

Now that https://postgr.es/m/20220125063131.4cmvsxbz2tdg6g65%40alap3.anarazel.de
is resolved, here's a rebased version. With a good bit of further cleanup.

One "big" thing that I'd like to figure out is a naming policy for the
different types prefixed with PgStat. We have different groups of types:

- "pending statistics", that are accumulated but not yet submitted to the
  shared stats system, like PgStat_TableStatus, PgStat_BackendFunctionEntry
  etc
- accumulated statistics like PgStat_StatDBEntry, PgStat_SLRUStats. About half are
  prefixed with PgStat_Stat, the other just with PgStat_
- random other types like PgStat_Single_Reset_Type, ...

To me it's very confusing to have these all in an essentially undistinguishing
namespace, particularly the top two items.

I think we should at least do s/PgStat_Stat/PgStat_/. Perhaps we should use a
distinct PgStatPending_* for the pending item? I can't quite come up with a
good name for the "accumulated" ones.


I'd like that get resolved first because I think that'd allow commiting the
prepatory split and reordering patches.

Greetings,

Andres Freund

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Andres Freund
Date:
Subject: Re: Design of pg_stat_subscription_workers vs pgstats