Skip site navigation (1) Skip section navigation (2)

Fix for pg_upgrade and invalid indexes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Fix for pg_upgrade and invalid indexes
Date: 2013-03-29 20:57:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-hackers
On Thu, Mar 28, 2013 at 05:27:28PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Should I just patch pg_upgrade to remove the "indisvalid", skip
> > "indisvalid" indexes, and backpatch it?  Users should be using the
> > version of pg_upgrade to match new pg_dump.  Is there any case where
> > they don't match?  Do I still need to check for "indisready"?
> Yeah, if you can just ignore !indisvalid indexes that should work fine.
> I see no need to look at indisready if you're doing that.

Attached is a patch that implements the suggested pg_upgrade changes of
not copying invalid indexes now that pg_dump doesn't dump them.  This
should be backpatched back to 8.4 to match pg_dump.  It might require
release note updates;  not sure.  Previously pg_upgrade threw an error
if invalid indexes exist, but only since February, when we released the
pg_upgrade fix to do this.  You can see the majority of this patch is
removing that check.

  Bruce Momjian  <bruce(at)momjian(dot)us>

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

Attachment: pg_upgrade.diff
Description: text/x-diff (4.8 KB)

In response to


pgsql-hackers by date

Next:From: Michael PaquierDate: 2013-03-29 21:49:15
Subject: Re: Getting to 9.3 beta
Previous:From: Tom LaneDate: 2013-03-29 20:37:25
Subject: Re: Hash Join cost estimates

pgsql-committers by date

Next:From: Tom LaneDate: 2013-03-29 22:35:08
Subject: Re: Fix for pg_upgrade and invalid indexes
Previous:From: Andrew DunstanDate: 2013-03-29 20:56:34
Subject: pgsql: Fix page title for JSON Functions and Operators.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group