Re: Switching Primary Keys to BigInt - Mailing list pgsql-general

From Mohamed Wael Khobalatte
Subject Re: Switching Primary Keys to BigInt
Date
Msg-id CABZeWdxREF+D=bZQ08SZg+AB5eU_CY4HKphPR43tC7sY_-BZvg@mail.gmail.com
Whole thread Raw
In response to Re: Switching Primary Keys to BigInt  (Michael Lewis <mlewis@entrata.com>)
Responses Re: Switching Primary Keys to BigInt
List 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 by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Switching Primary Keys to BigInt
Next
From: Mohamed Wael Khobalatte
Date:
Subject: Re: Switching Primary Keys to BigInt