Re: Gradual migration from integer to bigint?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Ann Harrison <ann(at)qbeast(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, James Healy <james(at)yob(dot)id(dot)au>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Gradual migration from integer to bigint?
Date: 2023-10-06 21:11:57
Message-ID: ZSB4HbCXIbk6Zh6q@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Oct 1, 2023 at 05:30:39AM -0400, Ann Harrison wrote:
> Other databases do allow that sort of gradual migration.  One example
> has an internal table of record descriptions indexed the table identifier 
> and a description number.  Each record includes a header with various 
> useful bits including its description number. When reading a record, 
> the system notes the description number and looks up the description 
> before parsing the record into columns.  
>
> The transition is made easier if the database indexes are generic - 
> for example, numbers rather than decimal[12,6], int32, etc., and string 
> rather than varchar[12].   That way, increasing a column size doesn't
> require re-indexing.
>
> But, those are decision that really had to be made early - making
> a major format change 25+ years in would break too much.

And the performance sounds terrible. ;-)

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shaheed Haque 2023-10-07 15:31:46 Monitoring logical replication
Previous Message Laurenz Albe 2023-10-06 20:28:20 Re: Restoring default privileges on objects