Re: pg_stat_statements has duplicate entries for the same query & queryId

2025-05-19 Thread Michael Paquier
On Mon, May 19, 2025 at 09:07:35AM +0200, Daniel Verite wrote: > That looks normal. The unicity to expect is on > (queryid, userid, dbid, toplevel). > > From https://www.postgresql.org/docs/current/pgstatstatements.html : > > This view contains one row for each distinct combination of database

Re: pg_stat_statements has duplicate entries for the same query & queryId

2025-05-19 Thread Daniel Verite
Jevon Cowell wrote: > What I'm seeing is that for the same query *and* query id, > there are two rows with different statistics data *at the same time*. For > example one row can have 2 calls while another can have 4 That looks normal. The unicity to expect is on (queryid, userid, dbid,

Re: pg_stat_statements has duplicate entries for the same query & queryId

2025-05-18 Thread Adrian Klaver
On 5/18/25 12:20, Jevon Cowell wrote: Hi Folks! Let me know if there's a better mailing list to ask this in. I have a statistics collector that collects data from various postgres statistics tables, pg_stat_statements being one of them. This is done on an entire fleet of Postgres databases. Fr

pg_stat_statements has duplicate entries for the same query & queryId

2025-05-18 Thread Jevon Cowell
Hi Folks! Let me know if there's a better mailing list to ask this in. I have a statistics collector that collects data from various postgres statistics tables, pg_stat_statements being one of them. This is done on an entire fleet of Postgres databases. From the collected data we record the timest