Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-08 Thread Michael Paquier
On Wed, Sep 04, 2024 at 06:27:43AM +, Bertrand Drouvot wrote: > Agree. The idea was to add an additional parameter (say "check_only") to the > flush_fixed_cb. If this parameter is set to true then the flush_fixed_cb would > do nothing (no flush at all) but return a boolean that would indicate i

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-08 Thread Michael Paquier
On Wed, Sep 04, 2024 at 06:37:01PM +0900, Kyotaro Horiguchi wrote: > I doubt that overprotection is always better, but in this case, it's > not overprotection at all. The flush callbacks are called > unconditionally once we decide to flush anything. Sorry for the noise. Yes, it's intended to be a

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-04 Thread Kyotaro Horiguchi
At Wed, 4 Sep 2024 15:12:37 +0900, Michael Paquier wrote in > On Wed, Sep 04, 2024 at 05:28:56AM +, Bertrand Drouvot wrote: > > On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: > >> The generalization sounds good to me, and hiding the private flags in > >> private places al

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-03 Thread Bertrand Drouvot
Hi, On Wed, Sep 04, 2024 at 03:12:37PM +0900, Michael Paquier wrote: > On Wed, Sep 04, 2024 at 05:28:56AM +, Bertrand Drouvot wrote: > > On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: > >> The generalization sounds good to me, and hiding the private flags in > >> private pl

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-03 Thread Michael Paquier
On Wed, Sep 04, 2024 at 05:28:56AM +, Bertrand Drouvot wrote: > On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: >> The generalization sounds good to me, and hiding the private flags in >> private places also seems good. > > +1 on the idea. Thanks for the feedback. >> Regar

Re: Add callbacks for fixed-numbered stats flush in pgstats

2024-09-03 Thread Bertrand Drouvot
Hi, On Wed, Sep 04, 2024 at 02:05:46PM +0900, Kyotaro Horiguchi wrote: > At Tue, 3 Sep 2024 13:48:59 +0900, Michael Paquier > wrote in > > Hi all, > > > > The last TODO item I had in my bucket about the generalization of > > pgstats is the option to a better control on the flush of the stats >