> 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