From: Daniel Verite <daniel@manitou-mail.org>
To: Mohamed Wael Khobalatte <mkhobalatte@grubhub.com>
Cc: Michael Lewis <mlewis@entrata.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Switching Primary Keys to BigInt
Date: Wed, 22 Jul 2020 17:13:15 +0200
Message-ID: <47d3a0f3-abb0-4c99-b7cb-fbcfc0e8ffd8@manitou-mail.org> (raw)
In-Reply-To: <CABZeWdzJWZEdqeAMQ7x_1ENSchps19rsF3pa9d-dLPKkGqVhEA@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: daniel@manitou-mail.org, mkhobalatte@grubhub.com, mlewis@entrata.com
Subject: Re: Switching Primary Keys to BigInt
In-Reply-To: <47d3a0f3-abb0-4c99-b7cb-fbcfc0e8ffd8@manitou-mail.org>
References: <CABZeWdzJWZEdqeAMQ7x_1ENSchps19rsF3pa9d-dLPKkGqVhEA@mail.gmail.com> <47d3a0f3-abb0-4c99-b7cb-fbcfc0e8ffd8@manitou-mail.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox