Re: shared-memory based stats collector - v68

2022-04-05 Thread David G. Johnston
On Tuesday, April 5, 2022, Andres Freund wrote: > Hi, > > On 2022-04-05 08:49:36 -0700, David G. Johnston wrote: > > On Mon, Apr 4, 2022 at 7:36 PM Andres Freund wrote: > > > > > > > > I think all this is going to achieve is to making code more > complicated. > > > There > > > is a *single* non-

Re: shared-memory based stats collector - v68

2022-04-05 Thread Andres Freund
Hi, On 2022-04-05 08:49:36 -0700, David G. Johnston wrote: > On Mon, Apr 4, 2022 at 7:36 PM Andres Freund wrote: > > > > > I think all this is going to achieve is to making code more complicated. > > There > > is a *single* non-assert use of accessed_across_databases and now a single > > asserti

Re: shared-memory based stats collector - v68

2022-04-05 Thread David G. Johnston
On Mon, Apr 4, 2022 at 7:36 PM Andres Freund wrote: > > I think all this is going to achieve is to making code more complicated. > There > is a *single* non-assert use of accessed_across_databases and now a single > assertion involving it. > > What would having PGSTAT_KIND_CLUSTER and PGSTAT_KIND

Re: shared-memory based stats collector - v68

2022-04-04 Thread Andres Freund
Hi, On 2022-04-04 19:03:13 -0700, David G. Johnston wrote: > > > (if this is true...but given this is an optimization category I'm > > thinking > > > maybe it doesn't actually matter...) > > > > It is true. Not sure what you mean with "optimization category"? > > > > > I mean that distinguishing b

Re: shared-memory based stats collector - v68

2022-04-04 Thread David G. Johnston
On Mon, Apr 4, 2022 at 3:44 PM Andres Freund wrote: > Hi, > > On 2022-04-04 15:24:24 -0700, David G. Johnston wrote: > > Replacing the existing assert(!kind->fixed_amount) with > > assert(!kind->accessed_across_databases) produces the same result as the > > later presently implies the former. > >

Re: shared-memory based stats collector - v68

2022-04-04 Thread Andres Freund
Hi, On 2022-04-04 15:24:24 -0700, David G. Johnston wrote: > Replacing the existing assert(!kind->fixed_amount) with > assert(!kind->accessed_across_databases) produces the same result as the > later presently implies the former. I wasn't proposing to replace, but to add... > Now I start to dis

Re: shared-memory based stats collector - v68

2022-04-04 Thread David G. Johnston
On Mon, Apr 4, 2022 at 2:54 PM Andres Freund wrote: > > > As the existing function only handles functions and relations why not > just > > perform a specific Kind check for them? Generalizing to assert on > whether > > or not the function works on fixed or variable Kinds seems beyond its > > pre

Re: shared-memory based stats collector - v68

2022-04-04 Thread Andres Freund
Hi, On 2022-04-04 14:25:57 -0700, David G. Johnston wrote: > > You mentioned this as a restriction above - I'm not seeing it as such? I'd > > like to write out stats more often in the future (e.g. in the > > checkpointer), > > but then it'd not be written out with this function... > > > > > Yeah,

Re: shared-memory based stats collector - v68

2022-04-04 Thread David G. Johnston
On Mon, Apr 4, 2022 at 2:06 PM Andres Freund wrote: > > > My first encounter with pg_stat_exists_stat() didn't draw my attention as > > being problematic so I'd say we just stick with it. As a SQL user > reading: > > WHERE exists (...) is somewhat natural; using "have" or back-to-back > > stat_s

Re: shared-memory based stats collector - v68

2022-04-04 Thread Andres Freund
Hi, On 2022-04-04 13:45:40 -0700, David G. Johnston wrote: > I didn't take the time to fixup all the various odd typos in the general > code comments; none of them reduced comprehension appreciably. I may do so > when/if I do another pass. Cool. > My first encounter with pg_stat_exists_stat()

Re: shared-memory based stats collector - v68

2022-04-04 Thread David G. Johnston
On Sun, Apr 3, 2022 at 9:16 PM Andres Freund wrote: > > Please take a look! > > I didn't take the time to fixup all the various odd typos in the general code comments; none of them reduced comprehension appreciably. I may do so when/if I do another pass. I did skim over the entire patch set and

Re: shared-memory based stats collector - v68

2022-04-04 Thread Andres Freund
Hi, On 2022-04-03 21:15:16 -0700, Andres Freund wrote: > - collect who reviewed earlier revisions I found reviews by - Tomas Vondra - Arthur Zakirov - Antonin Houska There's also reviews by Fujii and Alvaro, but afaics just for parts that were separately committed. Greetings, Andres Freund

Re: shared-memory based stats collector - v68

2022-04-04 Thread Andres Freund
Hi, On 2022-04-05 01:16:04 +1200, Thomas Munro wrote: > On Mon, Apr 4, 2022 at 4:16 PM Andres Freund wrote: > > Please take a look! > > A few superficial comments: > > > [PATCH v68 01/31] pgstat: consistent function header formatting. > > [PATCH v68 02/31] pgstat: remove some superflous comment

Re: shared-memory based stats collector - v68

2022-04-04 Thread Thomas Munro
On Mon, Apr 4, 2022 at 4:16 PM Andres Freund wrote: > Please take a look! A few superficial comments: > [PATCH v68 01/31] pgstat: consistent function header formatting. > [PATCH v68 02/31] pgstat: remove some superflous comments from pgstat.h. +1 > [PATCH v68 03/31] dshash: revise sequential s