pgstatspack pg_stat_statements error

From: Brett Gaston <bgaston(at)mcna(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: pgstatspack pg_stat_statements error
Date: 2012-12-18 17:10:11
Message-ID: CAEO=Rvrs_z34PcuUXU=knWhER+MP7pKhQX=mSDxUMptUuGRMvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

When I load pg_stat_statements in the shared library and try to run a
pgstatspack snapshot, I get the following errors: I am running version
2.3.1. Ironically, if I don't load load pg_stat_statements in the shared
library, I don't get these errors when running a snapshot although I do get
log warnings that I should load pg_stat_statements. Anyone have an idea of
what the issue could be?

2012-12-18 17:00:02.067 UTC postgres(at)test 22749 [local] ERROR: duplicate
key value violates unique constraint "idx_pgstatspack_names_name"
2012-12-18 17:00:02.067 UTC postgres(at)test 22749 [local] DETAIL: Key
(name)=(bgaston) already exists.
2012-12-18 17:00:02.067 UTC postgres(at)test 22749 [local] CONTEXT: SQL
statement "insert into pgstatspack_names (name)
select pg_get_userbyid(userid)
from pg_stat_statements
left join pgstatspack_names on pg_get_userbyid(userid)=name
where
dbid=(select oid from pg_database where datname=current_database())
and
name is null"
PL/pgSQL function "pgstatspack_snap" line 178 at SQL statement
2012-12-18 17:00:02.067 UTC postgres(at)test 22749 [local] STATEMENT: select
pgstatspack_snap('Cron-Based Snapshot');
2012-12-18 17:00:02.293 UTC postgres(at)dcm_selfcare 22751 [local] ERROR:
duplicate key value violates unique constraint "idx_pgstatspack_names_name"
2012-12-18 17:00:02.293 UTC postgres(at)dcm_selfcare 22751 [local] DETAIL:
Key (name)=(zenoss) already exists.
2012-12-18 17:00:02.293 UTC postgres(at)dcm_selfcare 22751 [local] CONTEXT:
SQL statement "insert into pgstatspack_names (name)
select pg_get_userbyid(userid)
from pg_stat_statements
left join pgstatspack_names on pg_get_userbyid(userid)=name
where
dbid=(select oid from pg_database where datname=current_database())
and
name is null"
PL/pgSQL function "pgstatspack_snap" line 178 at SQL statement
2012-12-18 17:00:02.293 UTC postgres(at)dcm_selfcare 22751 [local] STATEMENT:
select pgstatspack_snap('Cron-Based Snapshot');
2012-12-18 17:00:02.595 UTC postgres(at)dcm 22753 [local] ERROR: duplicate
key value violates unique constraint "idx_pgstatspack_names_name"
2012-12-18 17:00:02.595 UTC postgres(at)dcm 22753 [local] DETAIL: Key
(name)=(bgaston) already exists.
2012-12-18 17:00:02.595 UTC postgres(at)dcm 22753 [local] CONTEXT: SQL
statement "insert into pgstatspack_names (name)
select pg_get_userbyid(userid)
from pg_stat_statements
left join pgstatspack_names on pg_get_userbyid(userid)=name
where
dbid=(select oid from pg_database where datname=current_database())
and
name is null"
PL/pgSQL function "pgstatspack_snap" line 178 at SQL statement
2012-12-18 17:00:02.595 UTC postgres(at)dcm 22753 [local] STATEMENT: select
pgstatspack_snap('Cron-Based Snapshot');
2012-12-18 17:00:02.687 UTC postgres(at)portal 22755 [local] ERROR: duplicate
key value violates unique constraint "idx_pgstatspack_names_name"
2012-12-18 17:00:02.688 UTC postgres(at)portal 22755 [local] DETAIL: Key
(name)=(zenoss) already exists.
2012-12-18 17:00:02.688 UTC postgres(at)portal 22755 [local] CONTEXT: SQL
statement "insert into pgstatspack_names (name)
select pg_get_userbyid(userid)
from pg_stat_statements
left join pgstatspack_names on pg_get_userbyid(userid)=name
where
dbid=(select oid from pg_database where datname=current_database())
and
name is null"
PL/pgSQL function "pgstatspack_snap" line 178 at SQL statement

Browse pgsql-admin by date

  From Date Subject
Next Message Bernhard Schrader 2012-12-18 18:06:37 Re: [ADMIN] Problems with enums after pg_upgrade
Previous Message Bruce Momjian 2012-12-18 16:22:56 Re: [ADMIN] Problems with enums after pg_upgrade