Re: Naming of the different stats systems / "stats collector"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: Naming of the different stats systems / "stats collector"
Date: 2022-03-09 02:13:45
Message-ID: CAKFQuwasNN6Ls_W1xoZdbheOUf=pWaMAc1Pc3R-t2eUuVarCKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 8, 2022 at 6:50 PM Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2022-03-08 15:55:04 -0700, David G. Johnston wrote:
> > On Tue, Mar 8, 2022 at 1:54 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > One thing I'm not yet happy around the shared memory stats patch is
> > > naming. Currently a lot of comments say things like:
> > >
> > > * [...] We convert to
> > > * microseconds in PgStat_Counter format when transmitting to the
> > > collector.
> > >
>

"...format for writing to the statistics datastore"

> > > or
> > >
> > > # - Query and Index Statistics Collector -
>

"...Statistics Collection"

> > >
> > > or
> > >
> > > /* ----------
> > > * pgstat_report_subscription_drop() -
> > > *
> > > * Tell the collector about dropping the subscription.
> > > * ----------
> > > */
>

I would expect that either the function gets renamed or just goes away.
Just changing the word "collector" isn't going to be a good change, the new
description should describe whatever the new behavior is.

> > >
> > > the immediate question for the patch is what to replace "collector"
> with.
> > >
> > >
> > Not really following the broader context here so this came out of nowhere
> > for me. What is the argument for changing the status quo here?
> Collector
> > seems like good term.
>
> Sorry, probably should have shared a bit more context. The shared memory
> stats
> patch removes the stats collector process - which seems to make 'collector'
> not descriptive anymore...
>
>
As shown above I don't see that there is a single word that will simply
replace "collector". We are changing a core design of the system and each
dependent system will need to be tweaked in a context-appropriate manner.

As the process goes away we are now dealing directly with a conceptual
datastore. And instead of referring to the implementation detail of how
statistics are collected we can just refer to the "collection" behavior
generically. Whether we funnel through a process or write directly to the
datastore it is still statistics collection.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message wangw.fnst@fujitsu.com 2022-03-09 02:25:15 RE: Logical replication timeout problem
Previous Message Andres Freund 2022-03-09 02:01:23 Re: Allow async standbys wait for sync replication