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

Re: pg_upgrade problem with invalid indexes

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>,Stephen Frost <sfrost(at)snowman(dot)net>,Andrew Dunstan <andrew(at)dunslane(dot)net>,Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade problem with invalid indexes
Date: 2012-12-07 19:24:49
Message-ID: 20121207192449.GC8889@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Dec  7, 2012 at 11:57:34AM -0500, Bruce Momjian wrote:
> On Fri, Dec  7, 2012 at 11:46:51AM -0500, Tom Lane wrote:
> > Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > > On Fri, Dec  7, 2012 at 10:29:22AM -0500, Tom Lane wrote:
> > >> On balance I am coming around to support the "just throw an error if
> > >> there are any invalid indexes" position.  Adding extra complication in
> > >> pg_dump and pg_upgrade to handle ignoring them doesn't seem like a good
> > >> idea --- for one thing, it will evidently weaken the strength of the
> > >> same-number-of-relations cross-check.
> > 
> > > The check would remain the same --- the change would be to prevent
> > > invalid indexes from being considered on both the old and new servers.
> > 
> > But that weakens the check.  For instance, if you had seven invalid
> > indexes in one cluster and eight in the other, you wouldn't notice.
> 
> That is true, though the assumption is that invalid indexes are
> insignficant.  It would be a new case where actual non-system-table
> _files_ were not transfered.
> 
> Seems most people want the error so I will start working on a patch.

Patch attached.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

Attachment: invalid.diff
Description: text/x-diff (3.8 KB)

In response to

pgsql-hackers by date

Next:From: Karl O. PincDate: 2012-12-07 20:50:48
Subject: Re: User control over psql error stream
Previous:From: Andres FreundDate: 2012-12-07 19:10:04
Subject: Re: pg_upgrade problem with invalid indexes

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