Обсуждение: BUG #9050: pg_stat_statements() contains rows with the same dbid, userid and query

Поиск
Список
Период
Сортировка

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

От
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

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

От
Peter Geoghegan
Дата:
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