Re: Support reset of Shared objects statistics in "pg_stat_reset" function
Sadhuprasad Patro <b.sadhu@gmail.com>
From: Sadhuprasad Patro <b.sadhu@gmail.com>
To: Mahendra Singh Thalor <mahi6run@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>, Himanshu Upadhyaya <upadhyaya.himanshu@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-08-22T17:21:48Z
Lists: 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
Commits
-
Enhance pg_stat_reset_single_table_counters function.
- e04267844a9b 15.0 landed