Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 597EB1337BF7 for ; Tue, 19 Apr 2011 12:25:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 42886-03-4 for ; Tue, 19 Apr 2011 15:25:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1EEF41337FCF for ; Tue, 19 Apr 2011 12:05:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3JF5MAK002007; Tue, 19 Apr 2011 11:05:22 -0400 (EDT) To: jweatherman91@alumni.wfu.edu cc: pgsql-admin@postgresql.org Subject: Re: PKs without indexes In-reply-to: <1303209946.7538.12.camel@darkflame.weatherman.net> References: <1303209946.7538.12.camel@darkflame.weatherman.net> Comments: In-reply-to John P Weatherman message dated "Tue, 19 Apr 2011 05:45:46 -0500" Date: Tue, 19 Apr 2011 11:05:22 -0400 Message-ID: <2006.1303225522@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/175 X-Sequence-Number: 37356 John P Weatherman writes: > I am attempting to set up slony-i and have run into a minor > glitch...apparently whoever designed the database I have inherited > didn't consistently build indexes to go along with Primary Keys, or at > least that's the error message I have been getting. I am far from > confident in my own sqlfu in the catalog tables. Does anyone have a > script for identifying tables without indexes that correspond to their > PKs? I'm just trying to avoid re-inventing the wheel if I can help it. At least in Postgres, there is no such animal as a PK (or unique) constraint without an underlying index. Maybe you'd better be more clear about what problem you're having. regards, tom lane