[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: Why isn't there a IF NOT EXISTS clause on constraint creation?
From:       Luca Ferrari <fluca1978 () gmail ! com>
Date:       2023-09-04 8:30:08
Message-ID: CAKoxK+7D_rz+LE9opK4ydHKsnFn1u0_UKeHz3dafTFap_dg_dQ () mail ! gmail ! com
[Download RAW message or body]

On Fri, Sep 1, 2023 at 2:58 PM richard coleman
<rcoleman.ascentgl@gmail.com> wrote:
> 
> The schema is just fine. When loading large amounts of data, some tables are \
> greater than a terabyte in size, you typically don't have keys or indices until \
> after it finishes as that slows things down. I am not talking about two or three \
> tables, but hundreds of tables.  It's a rather labor intensive option for want of a \
> IF NOT EXISTS clause.

Well, I see the scope for tools like sqitch here.
Also because testing the existence of the index, in your particular
case, is one small step. What happens if the index has been
invalidated somehow? You will see an existing index that is unusable,
and this could happen also with a fantomatic "IF NOT EXISTS" behavior,
so it sounds to me you need something even more smarter.

Luca


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic