Re: Switching Primary Keys to BigInt

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "Mohamed Wael Khobalatte" <mkhobalatte(at)grubhub(dot)com>
Cc: "Michael Lewis" <mlewis(at)entrata(dot)com>,"pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Switching Primary Keys to BigInt
Date: 2020-07-22 15:13:15
Message-ID: 47d3a0f3-abb0-4c99-b7cb-fbcfc0e8ffd8@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mohamed Wael Khobalatte wrote:

> We lock the table as a precaution, with the understanding that we are
> undergoing a "small" downtime to finish replacing the int id by the new
> bigint

Ah, sorry I overlooked that most row updates are done
pre-transaction in a preliminary step:
/* in batches, we update all the rows to new_id = id */

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: https://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2020-07-22 15:23:12 Re: Logical replication from 11.x to 12.x and "unique key violations"
Previous Message Adrian Klaver 2020-07-22 14:42:25 Re: Logical replication from 11.x to 12.x and "unique key violations"