Re: What to watch out for when ALTERing NUMERIC(38,0) to BIGINT?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 28, 2022 at 8:13 AM Ron <ronljohnsonjr@xxxxxxxxx> wrote:
AWS RDS Postgresql 12.10


We've got tables with columns of data type NUMERIC(38,0) which are a legacy from an Oracle migration.

Besides what's mentioned in https://www.postgresql.org/docs/12/ddl-alter.html#id-1.5.4.8.10, what happens internally when I run:
ALTER TABLE foo ALTER COLUMN bar TYPE BIGINT;

I'm thinking mostly of record fragmentation.


IIUC, that would be the silver lining in all of this - the rewritten table would have zero fragmentation and bloat.  You don't get clustering so the actual physical ordering will still be random but each page will contain all live tuples contiguously placed.

David J.


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux