BUG #9050: pg_stat_statements() contains rows with the same dbid, userid and query

Started by Alexey Bashtanovabout 12 years ago2 messagesbugs
Jump to latest
#1Alexey Bashtanov
bashtanov@imap.cc

The following bug has been logged on the website:

Bug reference: 9050
Logged by: Alexey Bashtanov
Email address: bashtanov@imap.cc
PostgreSQL version: 9.3.1
Operating system: Linux
Description:

hello!

such a query run under superuser produces non-empty result:

select userid, dbid, query from pg_stat_statements() group by 1,2,3 having
count(1) > 1;

I am not sure how to reproduce it, but it can be reproduced only on those
instances having several databases on it.

Regards, Alexey

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

In reply to: Alexey Bashtanov (#1)
Re: BUG #9050: pg_stat_statements() contains rows with the same dbid, userid and query

On Fri, Jan 31, 2014 at 12:18 AM, <bashtanov@imap.cc> wrote:

such a query run under superuser produces non-empty result:

select userid, dbid, query from pg_stat_statements() group by 1,2,3 having
count(1) > 1;

Did you drop and recreate the table? That counts as a distinct table
and distinct query as far as pg_stat_statements is concerned.

--
Peter Geoghegan

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs