Disabling indexes on a table

From: John Scalia <jayknowsunix(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Disabling indexes on a table
Date: 2021-02-18 16:24:57
Message-ID: 8D9636C9-D38E-4857-A542-1469A11A25FF@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

One of my developers asked me about this, and he suggested running the following update:

UPDATE pg_index SET indisready=false
WHERE indrelid = (select oid from pg_class where release = ‘his_table’);

I told him it’s never a good idea to update anything in a system catalog by hand, but that I would reach out here for a better opinion. Am I correct that he shouldn’t try this, or is he OK to do this? His table has approximately 8 different indexes on it, and those really slow down his bulk loads. Usually when I have to get involved, I just drop his indexes and rebuild them afterwards, and I know that is always safe.

Jay

Sent from my iPad

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message S Bob 2021-02-18 18:19:29 Significantly higher Read IO usage after upgrade from 10.7 to 10.11
Previous Message Scott Ribe 2021-02-18 16:03:46 Re: Error after Streaming Replication