From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andrey Klychkov <aaklychkov@mail.ru>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re:
Date: Mon, 8 Jun 2020 13:37:07 -0400
Message-ID: <20200608173707.GA18596@alvherre.pgsql> (raw)
In-Reply-To: <1590581418.481387288@f493.i.mail.ru>
On 2020-May-27, Andrey Klychkov wrote:
> =======
> BEFORE:
> =======
>
> Indexes:
> "act_re_procdef_pkey" PRIMARY KEY, btree (id_)
> "act_uniq_procdef" UNIQUE CONSTRAINT, btree (key_, version_, tenant_id_)
> "act_re_procdef_deployment_id_idx" btree (deployment_id_)
> =====
> AFTER
> =====
>
> Indexes:
> "act_re_procdef_pkey" PRIMARY KEY, btree (id_)
> "act_re_procdef_pkey_ccnew" UNIQUE, btree (id_) INVALID
> "act_uniq_procdef" UNIQUE CONSTRAINT, btree (key_, version_, tenant_id_)
> "act_uniq_procdef_ccnew" UNIQUE, btree (key_, version_, tenant_id_) INVALID
> "act_re_procdef_deployment_id_idx" btree (deployment_id_)
> "act_re_procdef_deployment_id_idx_ccnew" btree (deployment_id_) INVALID
> I got the error related to the one UNIQUE index, why all the new indexes are invalid?
> >There is a paragraph about the handling of invalid indexes on the
> >reindex page:
> >https://www.postgresql.org/docs/devel/sql-reindex.html#SQL-REINDEX-CONCURRENTLY
> >"The recommended recovery method in such cases is to drop the invalid
> >index and try again to perform REINDEX CONCURRENTLY.
I think this part remains unanswered: why are there *three* invalid
indexes, and not two? It makes sense for the UNIQUE indexes to acquire
invalid duplicates, but strangely we also have a
act_re_procdef_deployment_id_idx_ccnew which is *not* unique. What
happened there?
(I also wonder if it wouldn't make more sense to reindexdb to attempt to
drop indexes that it couldn't complete.)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, aaklychkov@mail.ru, michael@paquier.xyz, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re:
In-Reply-To: <20200608173707.GA18596@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox