Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marcin Kowalski <kowalski@datrix.co.za>
Cc: pgsql-admin@postgresql.org
Date: 2001-03-31T23:57:50Z
Lists: pgsql-bugs, pgsql-hackers, pgsql-general
Marcin Kowalski <kowalski@datrix.co.za> 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