Re[4]:
От | Andrey Klychkov |
---|---|
Тема | Re[4]: |
Дата | |
Msg-id | 1591022345.482379838@f739.i.mail.ru обсуждение исходный текст |
Ответ на | Re: Re[2]: (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re:
|
Список | 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
------------------+----------------------+-----------+----------+-----------------------------
….
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)
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;
FROM pg_class, pg_index
WHERE pg_index.indisvalid = false
AND pg_index.indexrelid = pg_class.oid;
we get:
pg_toast_68086_index_ccnew
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
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.
Regards,
Andrew K.
В списке pgsql-bugs по дате отправления: