pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ireneusz Pluta <ipluta@wp.pl>
To: James Healy <james@yob.id.au>
To: pgsql-general@lists.postgresql.org
Subject: Re: Gradual migration from integer to bigint?
Date: Sun, 1 Oct 2023 19:04:42 +0200
Message-ID: <624e0261-2c7b-01cf-ec30-3c1e04af2b89@wp.pl> (raw)
In-Reply-To: <CAE4DO2THV1_70g5nRWDZiJOHPP7LnSHfYGzAdiTzFiu4L+o5iA@mail.gmail.com>
References: <CAE4DO2THV1_70g5nRWDZiJOHPP7LnSHfYGzAdiTzFiu4L+o5iA@mail.gmail.com>

W dniu 30.09.2023 o 07:55, James Healy pisze:
> ...
> We shouldn't have let them get so big, but that's a conversation
> for another day.
>
> Some are approaching overflow and we're slowly doing the work to
> migrate to bigint. Mostly via the well understood "add a new id_bigint
> column, populate on new tuples, backfill the old, switch the PK"
> method. The backfill is slow on these large tables, but it works and
> there's plenty of blog posts and documentation to follow.
wouldn't wrapping to negative numbers like: https://www.youtube.com/watch?v=XYRgTazYuZ4&t=1338s be a 
solution for you? At least for buying more time for the slow migration process. Or even as a 
definite solution if you now take care and not let the keys grow too quickly.





view thread (12+ messages)  latest in thread

Message-ID: <624e0261-2c7b-01cf-ec30-3c1e04af2b89@wp.pl>
Permalink:  ../624e0261-2c7b-01cf-ec30-3c1e04af2b89@wp.pl/
Also on:    postgresql.org/message-id/624e0261-2c7b-01cf-ec30-3c1e04af2b89@wp.pl

 · 

reply

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: ipluta@wp.pl, james@yob.id.au
  Subject: Re: Gradual migration from integer to bigint?
  In-Reply-To: <624e0261-2c7b-01cf-ec30-3c1e04af2b89@wp.pl>
  References: <CAE4DO2THV1_70g5nRWDZiJOHPP7LnSHfYGzAdiTzFiu4L+o5iA@mail.gmail.com> <624e0261-2c7b-01cf-ec30-3c1e04af2b89@wp.pl>

* 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