Received: from sss.pgh.pa.us ([216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f2VNwIK95590 for ; Sat, 31 Mar 2001 18:58:18 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f2VNvow28005; Sat, 31 Mar 2001 18:57:50 -0500 (EST) To: Marcin Kowalski cc: pgsql-admin@postgresql.org Subject: Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP In-reply-to: <99us31$cvk$1@news.tht.net> References: <18053.985792976@sss.pgh.pa.us> <99us31$cvk$1@news.tht.net> Comments: In-reply-to Marcin Kowalski message dated "Thu, 29 Mar 2001 10:35:06 +0200" Date: Sat, 31 Mar 2001 18:57:50 -0500 Message-ID: <28002.986083070@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200103/268 X-Sequence-Number: 1132 Marcin Kowalski writes: > DON'T DO THIS!!! > ------- > CREATE UNIQUE INDEX shadow_index ON pg_shadow (usename) > ------- Indeed, trying to create nonstandard indexes on system catalogs is a BAD idea. There probably ought to be a check to prevent you from trying. > What can I do??? I've got a non-trivial amount of data that I cannot afford > to lose!! HELP!.. I think you'd be OK if you could drop the index and then do update pg_class set relhasindex = 'f' where relname = 'pg_shadow'; The trick is to be able to do that when the database is busted. I think you may be able to do this if you restart in "ignore system indexes" mode (use "-o -P" while starting postmaster). Worth a try anyway. regards, tom lane