From: Andrey Klychkov <aaklychkov@mail.ru>
To: 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[4]:
Date: Mon, 01 Jun 2020 17:39:05 +0300
Message-ID: <1591022345.482379838@f739.i.mail.ru> (raw)
In-Reply-To: <20200531015134.GK44192@paquier.xyz>
References: <1590486572.205117372@f500.i.mail.ru>
<9918.1590758278@sss.pgh.pa.us>
<20200531015134.GK44192@paquier.xyz>
Continuing working with the feature.
If we run the following, we won't see any broken indexes:
zabbix=# \d sysmap_shape
Table "public.sysmap_shape"
Column | Type | Collation | Nullable | Default
------------------+----------------------+-----------+----------+-----------------------------
….
….
Indexes:
"sysmap_shape_pkey" PRIMARY KEY, btree (sysmap_shapeid)
"sysmap_shape_1" btree (sysmapid)
But if we run the following query we'll see a broken index related to the same table but including toast.
SELECT pg_class.relname
FROM pg_class, pg_index
WHERE pg_index.indisvalid = false
AND pg_index.indexrelid = pg_class.oid;
we get:
pg_toast_68086_index_ccnew
It's logical but not obvious.
So, would be also really helpful to have in the documentation:
1. note about the query above, i.e. how to find invalid indexes including TOAST to https://www.postgresql.org/docs/current/sql-reindex.html and to https://www.postgresql.org/docs/current/sql-dropindex.html
2. Referrence how to drop toast indexes to https://www.postgresql.org/docs/current/sql-dropindex.html
I’ve seen on the internet people ask each other about this (when i was searching the same not seeing that in the documentation).
Thanks for the previous patch!
>Воскресенье, 31 мая 2020, 4:51 +03:00 от Michael Paquier <michael@paquier.xyz>:
>
>On Fri, May 29, 2020 at 09:17:58AM -0400, Tom Lane wrote:
>> Sure, works for me.
>Thanks, applied then.
>--
>Michael
>
--
Regards,
Andrew K.
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: aaklychkov@mail.ru, michael@paquier.xyz, peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: Re[4]:
In-Reply-To: <1591022345.482379838@f739.i.mail.ru>
* 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