Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyGQw-0008JG-1M for pgsql-general@arkaria.postgresql.org; Wed, 22 Jul 2020 15:13:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jyGQu-0004Ip-VK for pgsql-general@arkaria.postgresql.org; Wed, 22 Jul 2020 15:13:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyGQu-0004GR-N2 for pgsql-general@lists.postgresql.org; Wed, 22 Jul 2020 15:13:24 +0000 Received: from mail.verite.pro ([185.16.44.216]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jyGQs-0000jw-8R for pgsql-general@postgresql.org; Wed, 22 Jul 2020 15:13:23 +0000 Received: from genius-map.net (verite.pro [195.154.189.246]) by mail.verite.pro (Postfix) with ESMTP id 45EA28C0229; Wed, 22 Jul 2020 17:04:19 +0200 (CEST) Received: by genius-map.net (Postfix, from userid 1001) id C399A38A0754; Wed, 22 Jul 2020 17:13:16 +0200 (CEST) Content-Type: text/plain; charset="iso-8859-15" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: Switching Primary Keys to BigInt From: "Daniel Verite" To: "Mohamed Wael Khobalatte" Cc: "Michael Lewis" ,"pgsql-general" In-Reply-To: Date: Wed, 22 Jul 2020 17:13:15 +0200 Message-Id: <47d3a0f3-abb0-4c99-b7cb-fbcfc0e8ffd8@manitou-mail.org> X-Mailer: Manitou v1.7.3 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 =3D id */ Best regards, --=20 Daniel V=E9rit=E9 PostgreSQL-powered mailer: https://www.manitou-mail.org Twitter: @DanielVerite