From: | Andrey Klychkov <aaklychkov(at)mail(dot)ru> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re[4]: |
Date: | 2020-06-01 14:39:05 |
Message-ID: | 1591022345.482379838@f739.i.mail.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)paquier(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Jawarilal, Manish | 2020-06-01 14:50:41 | RE: pgbench bug / limitation |
Previous Message | PG Bug reporting form | 2020-06-01 13:52:06 | BUG #16473: Marked as broken because of SQLSTATE(08006),ErrorCode(0) |