Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E96969FA4CA for ; Mon, 5 Feb 2007 17:36:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 13349-10 for ; Mon, 5 Feb 2007 17:36:27 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from power2u.goelsen.net (mail.goelsen.net [195.202.170.130]) by postgresql.org (Postfix) with ESMTP id 87C219F9F80 for ; Mon, 5 Feb 2007 17:36:27 -0400 (AST) X-Envelope-From: michael.monnerie@it-management.at Received: from localhost (localhost [127.0.0.1]) by power2u.goelsen.net (Postfix) with ESMTP id 4E8A9725CB for ; Mon, 5 Feb 2007 22:36:25 +0100 (CET) Received: from power2u.goelsen.net ([127.0.0.1]) by localhost (power2u.goelsen.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20660-06 for ; Mon, 5 Feb 2007 22:36:15 +0100 (CET) X-Envelope-From: michael.monnerie@it-management.at Received: from mailsrv.i.zmi.at (h081217116113.dyn.cm.kabsi.at [81.217.116.113]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailsrv.i.zmi.at", Issuer "mailsrv.i.zmi.at" (not verified)) by power2u.goelsen.net (Postfix) with ESMTP id 21C4D6F415 for ; Mon, 5 Feb 2007 22:36:15 +0100 (CET) From: Michael Monnerie Organization: it-management http://it-management.at To: pgsql-admin@postgresql.org Subject: Re: destroyed db/index (corruption) Date: Mon, 5 Feb 2007 22:36:13 +0100 User-Agent: KMail/1.9.5 References: <200702051500.19196@zmi.at> <200702051622.55632.achill@matrix.gatewaynet.com> In-Reply-To: <200702051622.55632.achill@matrix.gatewaynet.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1491940.NZV9tWtqEZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200702052236.13498@zmi.at> X-Virus-Scanned: amavisd-new at goelsen.net X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.089 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, SPF_HELO_PASS X-Spam-Level: X-Archive-Number: 200702/63 X-Sequence-Number: 24528 --nextPart1491940.NZV9tWtqEZ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Montag, 5. Februar 2007 15:22 Achilleas Mantzios wrote: > This ERROR is normally thrown when you *try* to violate a unique > constraint. Can you demonstrate the presence of the UNIQUE constraint > on your table and the pair of identical key values rows? > Post a description (\d) of your table, and then the select stmt which > return the 2 bad rows. Kalispera Achilleas, I will do this soon. Just now I'm upgrading that VM from SUSE 10.1 to=20 10.2, so later this night I'll reload the databases.=20 > I might be wrong, but i would bet the whole issue began because > some rows were inserted by a client (other than the reloading psql) > during reload but before the UNIQUE KEY DDL > was executed, or smth like that, or simply because this bayes_seen > value is attempted to be inserted again > (for reasons beyond our scope) No, I started those DBs fresh with the command pg_restore -v pg.fulldump.bayes_power2u.sqlz | \ psql -U postgres bayes_pg3 -f - Is there an easy way to find out which key is duplicated while I have=20 that DB running? The log doesn't show it, and the last time I did=20 reload with trial-and-error: =2D start reload =2D it stops somewhere complaining about line 34587328 or similiar =2D make some tail & head foo, or vi, to delete the one duplicate line =2D start again... It would be nice to have a simpler process. Could it be that the stored=20 procedure could cause a problem? I took all that from the SpamAssassin=20 Wiki, without modification. mfg zmi =2D-=20 // Michael Monnerie, Ing.BSc ----- http://it-management.at // Tel: 0676/846 914 666 .network.your.ideas. // PGP Key: "curl -s http://zmi.at/zmi4.asc | gpg --import" // Fingerprint: EA39 8918 EDFF 0A68 ACFB 11B7 BA2D 060F 1C6F E6B0 // Keyserver: www.keyserver.net Key-ID: 1C6FE6B0 --nextPart1491940.NZV9tWtqEZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFx6NNui0GDxxv5rARAgw1AKCin/ujQMD7MYg00gLrMYXZkNV76ACgsFLE 1BCvmDz8gE7THsZa0FD2EmM= =f3p+ -----END PGP SIGNATURE----- --nextPart1491940.NZV9tWtqEZ--