Re: pg_upgrade problem with invalid indexes

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_upgrade problem with invalid indexes
Date: 2012-12-07 21:38:39
Message-ID: 20121207213839.GI8476@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2012-12-07 16:30:36 -0500, Bruce Momjian wrote:
> On Fri, Dec 7, 2012 at 04:21:48PM -0500, Tom Lane wrote:
> > Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > > On 2012-12-07 13:59:41 -0500, Tom Lane wrote:
> > >> indisvalid should be sufficient. If you try to test more than that
> > >> you're going to make the code more version-specific, without actually
> > >> buying much.
> >
> > > Doesn't the check need to be at least indisvalid && indisready? Given
> > > that 9.2 represents !indislive as indisvalid && !indisready?
> >
> > Um, good point. It's annoying that we had to do it like that ...
>
> So, does this affect pg_upgrade? Which PG versions?

Only 9.2 :(. Before that there was no DROP INDEX CONCURRENTLY and in 9.3
there's an actual indislive field and indisready is always set to false
there if indislive is false.

But I see no problem using !indisvalid || !indisready as the condition
in all (supported) versions.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-12-07 21:49:19 Re: pg_upgrade problem with invalid indexes
Previous Message Tom Lane 2012-12-07 21:37:32 Re: pg_upgrade problem with invalid indexes