Hackers,
as mentioned in [1], I have created an implementation of command counter statistics very similar in purpose to the one
alreadypending in the commitfest going by the name "pg_stat_sql". I don't really care if this implementation is seen
asbuilding on that one or as separate, but I was worried about hijacking that thread, so I'm starting this thead.
Thereare elements of this patch that borrowed from that one, so if this is accepted, authorship should reflect that.
See the work by Haribabu Kommi (haribabu) at https://commitfest.postgresql.org/27/790/
The two main differences are that
(1) This implementation is based on commandtags as enums, not strings and
(2) This implementation uses techniques to reduce lock contention
I think (2) is the more important part.
[1] https://www.postgresql.org/message-id/28F46159-3764-421B-904B-004DEA339310%40enterprisedb.com
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company