Re: Support reset of Shared objects statistics in "pg_stat_reset" function

From: Sadhuprasad Patro <b(dot)sadhu(at)gmail(dot)com>
To: Mahendra Singh Thalor <mahi6run(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Himanshu Upadhyaya <upadhyaya(dot)himanshu(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Support reset of Shared objects statistics in "pg_stat_reset" function
Date: 2021-08-19 16:54:06
Message-ID: CAFF0-CE0ZV79+NoKzQTeR0MxWgAkAT0tTK5w0mG2u0MT+aGfFw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 11, 2021 at 10:30 AM Mahendra Singh Thalor
<mahi6run(at)gmail(dot)com> wrote:
>
> On Wed, 11 Aug 2021 at 09:17, Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > On Tue, Aug 10, 2021 at 10:49 PM Mahendra Singh Thalor
> > <mahi6run(at)gmail(dot)com> wrote:
> >
> > > I checked this and found that we already have one process "stats
> > > collector" and in v02 patch, we are sending requests to collect stats
> > > two times. I don't know how costly one call is but I feel that we can
> > > avoid the 2nd call by keeping handling of the shared tables into
> > > pgstat_recv_resetcounter.
> > >
> >
> > I think let's not make the stat collector aware of what we want to
> > achieve, so the stat collector will only reset for what we have asked
> > for and let the caller or the signal sender decide what they want to
> > do.

If we do support resetting the stats for shared tables in
'pg_stat_reset', which is for DB level,
then the stats of shared tables will be reseted in other instances as
well, which seems to be not correct.
So we need to provide some way to reset the stats for shared tables to
customers.

In the latest patch, we have supported only through the
pgstat_recv_resetsinglecounter function to reset stats for shared
tables.

Thanks & Regards
SadhuPrasad
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v3-0001-Support-pg_stat_reset_single_table_counters-for-s.patch application/octet-stream 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-08-19 17:05:27 Re: Fix around conn_duration in pgbench
Previous Message Peter Geoghegan 2021-08-19 16:44:09 Re: reporting TID/table with corruption error