Re: Best Approach for Swapping a Table with its Copy

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Michał Kłeczek <michal(at)kleczek(dot)org>
Cc: Marcelo Fernandes <marcefern7(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Best Approach for Swapping a Table with its Copy
Date: 2025-02-14 15:19:57
Message-ID: CAKAnmmLcD9y9WMTNCuPfhGOW17KS-+9kKo44Ve85CHu+YJ8WCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 14, 2025 at 1:02 AM Michał Kłeczek <michal(at)kleczek(dot)org> wrote:

> Create index concurrently and then fiddle with the catalog tables to
> define the constraint using this index?
>

You mean an ALTER TABLE ... ADD CONSTRAINT ... EXCLUDE without actually
doing an ALTER TABLE. Nope, that's far worse than the pg_repack
shenanigans, as we would be creating new catalog objects.

Ideally would be that someone adds support for USING INDEX for an exclusion
constraint.

Cheers,
Greg

--
Crunchy Data - https://www.crunchydata.com
Enterprise Postgres Software Products & Tech Support

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yongye Serkfem 2025-02-15 19:01:22 Bash profile
Previous Message Greg Sabino Mullane 2025-02-14 15:14:45 Re: Best Approach for Swapping a Table with its Copy