Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 3FCB26500C5 for ; Wed, 17 Dec 2008 18:09:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 70512-10 for ; Wed, 17 Dec 2008 18:09:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailsrv1.zmi.at (mailsrv1.zmi.at [212.69.162.198]) by mail.postgresql.org (Postfix) with ESMTP id D8E25650080 for ; Wed, 17 Dec 2008 18:09:55 -0400 (AST) Received: from saturn.localnet (h081217054243.dyn.cm.kabsi.at [81.217.54.243]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mailsrv1.zmi.at (Postfix) with ESMTP id 6796B425 for ; Wed, 17 Dec 2008 23:09:53 +0100 (CET) From: Michael Monnerie Organization: it-management http://it-management.at To: pgsql-admin@postgresql.org Subject: DROP INDEX causes errors Date: Wed, 17 Dec 2008 23:09:54 +0100 User-Agent: KMail/1.10.1 (Linux/2.6.27.8-ZMI; KDE/4.1.3; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2028770.43tSbNW1ob"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200812172309.54457@zmi.at> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200812/135 X-Sequence-Number: 30968 --nextPart2028770.43tSbNW1ob Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline # select version(); version =2D------------------------------------------------------------------------= =2D----------------------------------------- PostgreSQL 8.1.11 on x86_64-unknown-linux-gnu, compiled by GCC gcc=20 (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) Today I dropped an index: DROP INDEX dbmail_messageblks_physmessage_idx ; The table is now: # \d dbmail_messageblks Tabelle =C2=BBpublic.dbmail_messageblks=C2=AB Spalte | Typ | Attribute =2D----------------+----------+--------------------------------------------= =2D--------------------- messageblk_idnr | bigint | not null default=20 nextval('dbmail_messageblk_idnr_seq'::regclass) physmessage_id | bigint | messageblk | bytea | not null blocksize | bigint | not null default (0)::bigint is_header | smallint | not null default (0)::smallint Indexe: =C2=BBdbmail_messageblks_pkey=C2=AB PRIMARY KEY, btree (messageblk_idnr) =C2=BBdbmail_messageblks_physmessage_is_header_idx=C2=AB btree=20 (physmessage_id, is_header) CLUSTER =46remdschl=C3=BCssel-Constraints: =C2=BBdbmail_messageblks_physmessage_id_fkey=C2=AB FOREIGN KEY=20 (physmessage_id) REFERENCES dbmail_physmessage(id) ON UPDATE CASCADE ON=20 DELETE CASCADE And immediately after the drop I got this: DELETE:ERROR: could not open relation with OID 102021 DELETE:CONTEXT: SQL statement "DELETE FROM ONLY=20 "public"."dbmail_messageblks" WHERE "physmessage_id" =3D $1" for each and every delete of a row in that table. After a REINDEX TABLE dbmail_messageblks; everything seems to work. Is that a bug or did I do something bad? mfg zmi =2D-=20 // Michael Monnerie, Ing.BSc ----- http://it-management.at // Tel: 0660 / 415 65 31 .network.your.ideas. // PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import" // Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4 // Keyserver: wwwkeys.eu.pgp.net Key-ID: 1C1209B4 --nextPart2028770.43tSbNW1ob Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAklJeLIACgkQzhSR9xwSCbT4mQCgvwlz9dUB5tfJXWtZHEviCAlR l7sAoK+C/6WKaTRHUFaoA7UKQ6moyzIg =SJ4y -----END PGP SIGNATURE----- --nextPart2028770.43tSbNW1ob--