From: Michael Paquier <michael@paquier.xyz>
To: Andrey Klychkov <aaklychkov@mail.ru>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re:
Date: Tue, 2 Jun 2020 10:32:10 +0900
Message-ID: <20200602013210.GA3346@paquier.xyz> (raw)
In-Reply-To: <1591022345.482379838@f739.i.mail.ru>
References: <1590486572.205117372@f500.i.mail.ru>
<9918.1590758278@sss.pgh.pa.us>
<20200531015134.GK44192@paquier.xyz>
<1591022345.482379838@f739.i.mail.ru>
On Mon, Jun 01, 2020 at 05:39:05PM +0300, Andrey Klychkov wrote:
> I’ve seen on the internet people ask each other about this (when i
> was searching the same not seeing that in the documentation).
Note that indexes and tables can be schema-qualified in a REINDEX
query, so you would need a bit more than the query above, still you
could just wrap that in a plpgsql function that scans pg_class and
pg_index, and issues a set of DROP INDEX commands on each entry. I
have been wondering as well in the past about adding a set of SQL
queries to be able to do the work in a database as if you run into
this issue repeatedly it is annoying. So we could add that on the
reindex page close to the paragraph about the drop of invalid
indexes.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
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: michael@paquier.xyz, aaklychkov@mail.ru, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re:
In-Reply-To: <20200602013210.GA3346@paquier.xyz>
* 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