On Tue, Jun 30, 2020 at 6:38 AM Masahiko Sawada <masahiko.saw...@2ndquadrant.com> wrote: > > On Mon, 29 Jun 2020 at 20:37, Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > On Mon, Jun 29, 2020 at 10:26 AM Masahiko Sawada > > <masahiko.saw...@2ndquadrant.com> wrote: > > > > > > I agree that it would not be a common case that the user sets > > > different values for different processes. Based on that assumption, I > > > also think having the stats at slot-level is a good idea. > > > > > > > Okay. > > > > > But I might > > > want to have the reset function. > > > > > > > I don't mind but lets fist see how the patch for the basic feature > > looks and what is required to implement it? Are you interested in > > writing the patch for this work? > > Yes, I'll write the draft patch. >
Great, thanks. One thing we can consider is that instead of storing the stats directly in the slot we can consider sending it to stats collector as suggested by Tomas. Basically that can avoid contention around slots (See discussion in email [1]). I have not evaluated any of the approaches in detail so you can let us know the advantage of one over another. Now, you might be already considering this but I thought it is better to share what I have in mind rather than saying that later once you have the draft patch ready. [1] - https://www.postgresql.org/message-id/20200623101831.it6lzwbm37xwquco%40development -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com