Gradual migration from integer to bigint?

2023-09-29 Thread James Healy
My organization has a number of very large tables (most 100s of GB, a couple over a Tb) that were created many years ago by a tool that defaulted to integer PKs rather than bigint. Those PKs have a number of integer FKs in related tables as well. We shouldn't have let them get so big, but that's a

Re: Gradual migration from integer to bigint?

2023-09-30 Thread James Healy
On Sun, 1 Oct 2023 at 04:35, Bruce Momjian wrote: > I think this talk will help you: > > https://www.youtube.com/watch?v=XYRgTazYuZ4 Thanks, I hadn't seen that talk and it's a good summary of the issue and available solutions. However it doesn't really address the question of a gradual

Re: Gradual migration from integer to bigint?

2023-10-01 Thread James Healy
On Sun, 1 Oct 2023 at 14:37, Tom Lane wrote: > I think what you're asking for is a scheme whereby some rows in a > table have datatype X in a particular column while other rows in > the very same physical table have datatype Y in the same column. > That is not happening, because there'd be no way