From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marcin Kowalski <kowalski@datrix.co.za>
Cc: pgsql-admin@postgresql.org
Subject: Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP
Date: Sat, 31 Mar 2001 18:57:50 -0500
Message-ID: <28002.986083070@sss.pgh.pa.us> (raw)
In-Reply-To: <99us31$cvk$1@news.tht.net>
References: <18053.985792976@sss.pgh.pa.us>
<99us31$cvk$1@news.tht.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, kowalski@datrix.co.za, pgsql-admin@postgresql.org
Subject: Re: [SQL] Re: pg_dump potential bug -UNIQUE INDEX on PG_SHADOW Dont!! HELP
In-Reply-To: <28002.986083070@sss.pgh.pa.us>
References: <18053.985792976@sss.pgh.pa.us> <99us31$cvk$1@news.tht.net> <28002.986083070@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox