Re: ALTER INDEX/ALTER TABLE on indexes can cause unrestorable dumps - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: ALTER INDEX/ALTER TABLE on indexes can cause unrestorable dumps
Date
Msg-id 20080107191610.GI4723@alvh.no-ip.org
Whole thread Raw
In response to ALTER INDEX/ALTER TABLE on indexes can cause unrestorable dumps  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
List pgsql-bugs
dup 3854
thanks

Stefan Kaltenbrunner wrote:

> the reason for this seems to be that pg_dump is using the constraint name
> (which is not changed by ALTER TABLE/ALTER INDEX) and not the index name to
> dump this kind of information but I wonder if it would actually be more
> sensible (until we get ALTER TABLE .. ALTER CONSTRAINT) to simply forbid
> renaming indexes that are part of a constraint like that and hint towards
> ALTER TABLE ADD/DROP CONSTRAINT ?

I think the fix is to make pg_dump emit ALTER TABLE/CLUSTER ON using the
right index name ...

(This makes me wonder whether we should be making pg_dump emit sorted
output for tables with a clustering index.)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: ALTER INDEX/ALTER TABLE on indexes can cause unrestorable dumps
Next
From: Tom Lane
Date:
Subject: Re: BUG #3852: Could not create complex aggregate