On Sat, Aug 10, 2024 at 5:47 PM sud <suds1434@xxxxxxxxx> wrote:
My 2cents.If you have enough time then from a simplicity point of view, your single line alter command may look good, but how are you going to see the amount of progress it has made so far and how much time it's going to take to finish. And you got ~6hrs of down time but if it fails at 5th hour then you will be in a bad position.
Does it mean that , if we get enough downtime then , we should rather go with the option of recreating the table from scratch and populating the data from the existing table and then rename it back? It does look more complicated considering many steps like creating indexes, constraints back and renaming it and then running vacuum and analyze etc.
Can someone through some light , in case we get 5-6hrs downtime for this change , then what method should we choose for this Alter operation?