public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ron Johnson <[email protected]>
To: pgsql-admin <[email protected]>
Subject: Re: Dropping index from large, partitioned table
Date: Wed, 8 Oct 2025 07:59:47 -0400
Message-ID: <CANzqJaBTqzVH=hPTPGfp2LsJZtQ6otc+Th1PFA=kuALbmfTn_A@mail.gmail.com> (raw)
In-Reply-To: <CAHncFmQ+EVmXnhhiF0005t9Ceg=YUraTznPw_Ds1zK8+50vJRg@mail.gmail.com>
References: <CAHncFmQ+EVmXnhhiF0005t9Ceg=YUraTznPw_Ds1zK8+50vJRg@mail.gmail.com>

On Tue, Oct 7, 2025 at 5:01 PM Matthew Planchard <[email protected]>
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!


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Dropping index from large, partitioned table
  In-Reply-To: <CANzqJaBTqzVH=hPTPGfp2LsJZtQ6otc+Th1PFA=kuALbmfTn_A@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox