DROP INDEX causes errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# select version();
                                                      version
-------------------------------------------------------------------------------------------------------------------
 PostgreSQL 8.1.11 on x86_64-unknown-linux-gnu, compiled by GCC gcc 
(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 »public.dbmail_messageblks«
     Spalte      |   Typ    |                            Attribute
-----------------+----------+------------------------------------------------------------------
 messageblk_idnr | bigint   | not null default 
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:
    »dbmail_messageblks_pkey« PRIMARY KEY, btree (messageblk_idnr)
    »dbmail_messageblks_physmessage_is_header_idx« btree 
(physmessage_id, is_header) CLUSTER
Fremdschlüssel-Constraints:
    »dbmail_messageblks_physmessage_id_fkey« FOREIGN KEY 
(physmessage_id) REFERENCES dbmail_physmessage(id) ON UPDATE CASCADE ON 
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 
"public"."dbmail_messageblks" WHERE "physmessage_id" = $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
-- 
// 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

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux