Re: pg_upgrade problem with invalid indexes

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>, Andrew Dunstan <andrew@dunslane.net>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-12-07T03:08:11Z
Lists: pgsql-hackers
On Thu, Dec  6, 2012 at 10:06:13PM -0500, Tom Lane wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > * Andrew Dunstan (andrew@dunslane.net) wrote:
> >> Making the user fix it seems much more sensible to me. Otherwise I
> >> suspect we'll find users who get strangely surprised when they can
> >> no longer find any trace of an expected index in their upgraded
> >> database.
> 
> > Or preserve it as-is.
> 
> To do that, we would have to add an option to CREATE INDEX to create it
> in an invalid state.  Which is stupid...

I think we would have have pg_dump --binary-upgrade issue an UPDATE to
the system catalogs to mark it as invalid.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +