Re: Why isn't there a IF NOT EXISTS clause on constraint creation?

Поиск
Список
Период
Сортировка
От Luca Ferrari
Тема Re: Why isn't there a IF NOT EXISTS clause on constraint creation?
Дата
Msg-id CAKoxK+7D_rz+LE9opK4ydHKsnFn1u0_UKeHz3dafTFap_dg_dQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Why isn't there a IF NOT EXISTS clause on constraint creation?  (richard coleman <rcoleman.ascentgl@gmail.com>)
Список pgsql-admin
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
typicallydon'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
aIF 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



В списке pgsql-admin по дате отправления:

Предыдущее
От: Luca Ferrari
Дата:
Сообщение: Re: Autovacuum not running properly
Следующее
От: Rajesh Kumar
Дата:
Сообщение: Re: Autovacuum not running properly