Re: Support reset of Shared objects statistics in "pg_stat_reset" function - Mailing list pgsql-hackers

From Sadhuprasad Patro
Subject Re: Support reset of Shared objects statistics in "pg_stat_reset" function
Date
Msg-id CAFF0-CHSFD4=E4UvDEQeh-JwNj_aQ4XRuaD2gUKcV5b+qshY+A@mail.gmail.com
Whole thread Raw
In response to Re: Support reset of Shared objects statistics in "pg_stat_reset" function  (Mahendra Singh Thalor <mahi6run@gmail.com>)
List pgsql-hackers
> 3)
> -       dbentry = pgstat_get_db_entry(msg->m_databaseid, false);
> +       if (!IsSharedRelation(msg->m_objectid))
> +               dbentry = pgstat_get_db_entry(msg->m_databaseid, false);
> +       else
> +               dbentry = pgstat_get_db_entry(InvalidOid, false);
>
> We should add some comments before this change.

In my opinion, the comments added above the function
"pgstat_recv_resetsinglecounter" and the function call
"IsSharedRelation" added are self explanatory. If we add anything
more, it will be a duplication.
So No need to add any more comments here.


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



pgsql-hackers by date:

Previous
From: "蔡梦娟(玊于)"
Date:
Subject: Queries that should be canceled will get stuck on secure_write function
Next
From: Sadhuprasad Patro
Date:
Subject: Re: Support reset of Shared objects statistics in "pg_stat_reset" function