X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 83075475BEC for ; Sat, 1 Feb 2003 12:22:34 -0500 (EST) Received: from sj-msg-core-1.cisco.com (sj-msg-core-1.cisco.com [171.71.163.11]) by postgresql.org (Postfix) with ESMTP id 97A9F475F6A for ; Sat, 1 Feb 2003 12:21:41 -0500 (EST) Received: from mira-sjc5-e.cisco.com (IDENT:mirapoint@mira-sjc5-e.cisco.com [171.71.163.15]) by sj-msg-core-1.cisco.com (8.12.2/8.12.6) with ESMTP id h11HLkSQ003881 for ; Sat, 1 Feb 2003 09:21:46 -0800 (PST) Received: from cjwhitepc (sjc-vpn1-1141.cisco.com [10.21.100.117]) by mira-sjc5-e.cisco.com (Mirapoint Messaging Server MOS 3.2.1-GA) with ESMTP id ABA61913; Sat, 1 Feb 2003 09:21:45 -0800 (PST) From: "Chris White" To: Subject: Duplicate indexes found in the postgres Database Date: Sat, 1 Feb 2003 09:23:01 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/8 X-Sequence-Number: 7206 While interrogating the table information for our database, I notice that some tables (i.e. gui_config, vm_mailbox, vm_message) have duplicate entries. Does anybody know why this would occur and is it a problem? Attached are appropriate outputs. Queries on the tables which are duplicated in the entries appear to work normally. We are running version 7.2.1 aesop=# \dt List of relations Name | Type | Owner --------------+-------+----------- gui_config | table | aesop_gui gui_config | table | aesop_gui gui_prefs | table | aesop_gui vm_config | table | voicemail vm_dbversion | table | voicemail vm_emailjob | table | voicemail vm_greeting | table | voicemail vm_mailbox | table | voicemail vm_mailbox | table | voicemail vm_mbxusers | table | voicemail vm_message | table | voicemail vm_message | table | voicemail vm_usermsg | table | voicemail (13 rows) aesop=# select * from pg_tables ; tablename | tableowner | hasindexes | hasrules | hastriggers ----------------+------------+------------+----------+------------- pg_type | postgres | t | f | f pg_attribute | postgres | t | f | f pg_class | postgres | t | f | f pg_group | postgres | t | f | f pg_database | postgres | t | f | f pg_xactlock | postgres | f | f | f pg_inherits | postgres | t | f | f pg_index | postgres | t | f | f pg_operator | postgres | t | f | f pg_opclass | postgres | t | f | f pg_am | postgres | t | f | f pg_amop | postgres | t | f | f pg_amproc | postgres | t | f | f pg_language | postgres | t | f | f pg_largeobject | postgres | t | f | f pg_aggregate | postgres | t | f | f pg_trigger | postgres | t | f | f pg_listener | postgres | f | f | f pg_shadow | postgres | t | f | t pg_attrdef | postgres | t | f | f pg_description | postgres | t | f | f gui_config | aesop_gui | t | f | f pg_proc | postgres | t | f | f pg_relcheck | postgres | t | f | f gui_prefs | aesop_gui | t | f | f gui_config | aesop_gui | t | f | f pg_rewrite | postgres | t | f | f vm_config | voicemail | t | f | f vm_dbversion | voicemail | t | f | f pg_statistic | postgres | t | f | f vm_mbxusers | voicemail | t | f | t vm_greeting | voicemail | t | f | t vm_mailbox | voicemail | t | f | t vm_message | voicemail | t | f | t vm_mailbox | voicemail | t | f | t vm_usermsg | voicemail | t | f | t vm_message | voicemail | t | f | t vm_emailjob | voicemail | t | f | f (38 rows) aesop=# select * from pg_stat_user_tables aesop-# \g relid | relname | seq_scan | seq_tup_read | idx_scan | idx_tup_fetch | n_tup_ins | n_tup_upd | n_tup_del -------+--------------+----------+--------------+----------+---------------+ -----------+-----------+----------- 16560 | gui_config | 0 | 0 | 0 | 0 | 0 | 0 | 0 16563 | gui_prefs | 0 | 0 | | | 0 | 0 | 0 16566 | vm_config | 0 | 0 | 0 | 0 | 0 | 0 | 0 16569 | vm_dbversion | 0 | 0 | 0 | 0 | 0 | 0 | 0 16572 | vm_mailbox | 0 | 0 | 0 | 0 | 0 | 0 | 0 16575 | vm_mbxusers | 0 | 0 | 0 | 0 | 0 | 0 | 0 16584 | vm_greeting | 0 | 0 | 0 | 0 | 0 | 0 | 0 16593 | vm_message | 0 | 0 | 0 | 0 | 0 | 0 | 0 16602 | vm_usermsg | 0 | 0 | 0 | 0 | 0 | 0 | 0 16619 | vm_emailjob | 0 | 0 | 0 | 0 | 0 | 0 | 0 (10 rows) aesop=# select * from pg_stat_user_indexes ; relid | indexrelid | relname | indexrelname | idx_scan | idx_tup_read | idx_tup_fetch -------+------------+--------------+-------------------+----------+--------- -----+--------------- 16560 | 16562 | gui_config | gui_config_pkey | 0 | 0 | 0 16560 | 16562 | gui_config | gui_config_pkey | 0 | 0 | 0 16566 | 16568 | vm_config | vm_config_pkey | 0 | 0 | 0 16569 | 16571 | vm_dbversion | vm_dbversion_pkey | 0 | 0 | 0 16572 | 16574 | vm_mailbox | vm_mailbox_pkey | 0 | 0 | 0 16572 | 16574 | vm_mailbox | vm_mailbox_pkey | 0 | 0 | 0 16575 | 16577 | vm_mbxusers | vm_mbxusers_pkey | 0 | 0 | 0 16584 | 16586 | vm_greeting | vm_greeting_pkey | 0 | 0 | 0 16593 | 16595 | vm_message | vm_message_pkey | 0 | 0 | 0 16593 | 16595 | vm_message | vm_message_pkey | 0 | 0 | 0 16602 | 16604 | vm_usermsg | vm_usermsg_pkey | 0 | 0 | 0 16619 | 16624 | vm_emailjob | vm_emailjob_pkey | 0 | 0 | 0 (12 rows)