Re: Switching Primary Keys to BigInt

Поиск
Список
Период
Сортировка
От Mohamed Wael Khobalatte
Тема Re: Switching Primary Keys to BigInt
Дата
Msg-id CABZeWdxREF+D=bZQ08SZg+AB5eU_CY4HKphPR43tC7sY_-BZvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Switching Primary Keys to BigInt  (Michael Lewis <mlewis@entrata.com>)
Ответы Re: Switching Primary Keys to BigInt  (Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>)
Список pgsql-general
One presumes you may be planning to use pglogical or another similar solution to upgrade to a new Postgres version soon, and would have a convenient time then to change schema. I am curious, why not just stick with the single column unique index and forgo for the primary key constraint for now? If you are concerned about the possibility of a single null value being inserted, then you could add a not valid check constraint to enforce that for future rows.

Believe it or not I pitched a similar idea internally. I'll explore it in a test run.
 
Given your email domain, I can guess why you would need to absolutely minimize downtime.

Right. ;) 

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

Предыдущее
От: Michael Lewis
Дата:
Сообщение: Re: Switching Primary Keys to BigInt
Следующее
От: Mohamed Wael Khobalatte
Дата:
Сообщение: Re: Switching Primary Keys to BigInt