Re: Column type modification in big tables - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Column type modification in big tables
Date
Msg-id CAKAnmmKjWVdPHUFVStspC_20XSp8bVSSJa4j3RXnHNPqtQJdfQ@mail.gmail.com
Whole thread Raw
In response to Re: Column type modification in big tables  (Lok P <loknath.73@gmail.com>)
List pgsql-general
On Thu, Aug 15, 2024 at 4:41 PM Lok P <loknath.73@gmail.com> wrote:
Additionally , if we are okay with the 7.5hrs of down time , is my calculation/extrapolation of total time consumption based on a sample table,  for direct alter, accurate? Because, in that case , I was thinking it's less complex and also less error prone to just do it in a single alter command rather than going for multiple steps of detach, alter, attach partition.

Well, it's meant to get you a ballpark figure, but yes, it seems as though you will probably okay, But for something this critical involving production downtime, I would try out the exact command and see how long it takes on a test system. Restore a backup (you have backups I hope) or use pg_basebackup to make a copy of your prod system somewhere.

Cheers,
Greg




 

pgsql-general by date:

Previous
From: Dimitrios Apostolou
Date:
Subject: Re: array_agg() does not stop aggregating according to HAVING clause
Next
From: plsqlvids01 plsqlvids01
Date:
Subject: use of postgres reg* datatypes in user tables?