Re: Dropping index from large, partitioned table

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Dropping index from large, partitioned table
Date: 2025-10-08 11:59:47
Message-ID: CANzqJaBTqzVH=hPTPGfp2LsJZtQ6otc+Th1PFA=kuALbmfTn_A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Oct 7, 2025 at 5:01 PM Matthew Planchard <msplanchard(at)gmail(dot)com>
wrote:

> I have a very active table with around 1,000 partitions. I would like
> to drop a GIN index on one of its columns.
>
> Unfortunately, this is a top-level index, and so it seems impossible
> to drop the indexes on each partition individually, which means a
> 'drop index' requires holding an access exclusive lock on the entire
> table until the process completes for all children. That process turns
> out to be much too slow, since it requires locking one of our most
>

Too bad there's no ONLY. clause in DROP INDEX.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message André Verwijs 2025-10-08 12:18:54 please add pgadmin4 9.8-2.fc43 to pgadmin repo...
Previous Message Amod Kakade 2025-10-08 08:21:58 Re: Postgresql fedora - gpg key(s) not working/found ....