Re[4]: - Mailing list pgsql-bugs

From Andrey Klychkov
Subject Re[4]:
Date
Msg-id 1591022345.482379838@f739.i.mail.ru
Whole thread Raw
In response to Re: Re[2]:  (Michael Paquier <michael@paquier.xyz>)
Responses Re:
List pgsql-bugs
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.
 

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16473: Marked as broken because of SQLSTATE(08006),ErrorCode(0)
Next
From: "Jawarilal, Manish"
Date:
Subject: RE: pgbench bug / limitation