Re: Dropping behavior for unique CONSTRAINTs - Mailing list pgsql-general

From David Rowley
Subject Re: Dropping behavior for unique CONSTRAINTs
Date
Msg-id CAApHDvr+uVPeUh7z1iDiPfU_UV-cm3-qp2=YVrW2Dncoso4h=A@mail.gmail.com
Whole thread Raw
In response to Re: Dropping behavior for unique CONSTRAINTs  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Dropping behavior for unique CONSTRAINTs  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
On Sat, 4 Mar 2023 at 10:55, Ron <ronljohnsonjr@gmail.com> wrote:
> On 3/3/23 04:54, David Rowley wrote:
> If you have a look at
> https://www.postgresql.org/docs/15/sql-dropindex.html check out the
> CONCURRENTLY option. That option allows an index to be dropped without
> blocking concurrent reads and writes to the table. It seems like just
> having a unique index without the constraint is likely your best bet
> if you can't afford to block any traffic for the brief moment it would
> take to drop the constraint.
>
>
> That doc page says this about CONCURRENTLY:
> "
> There are several caveats to be aware of when using this option. Only one index name can be specified, and the
CASCADEoption is not supported. (Thus, an index that supports a UNIQUE or PRIMARY KEY constraint cannot be dropped this
way.)
> "

I'm not sure which one of these you think applies to the
recommendation I mentioned or if you were just generally highlighting
the limitations of DROP INDEX CONCURRENTLY.

David



pgsql-general by date:

Previous
From: Thomas Munro
Date:
Subject: Re: 13.x, stream replication and locale(?) issues
Next
From: Pavel Stehule
Date:
Subject: Re: Converting row elements into a arrays?