Re: Alter table fast

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Alter table fast
Date: 2025-01-09 16:27:20
Message-ID: CANzqJaB-k8Sae4st0NP4BW_VuNRP6e1V=f0E7O28URR23MuEww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 9, 2025 at 11:25 AM veem v <veema0000(at)gmail(dot)com> wrote:

> Hello,
> It's postgres version 16.1, we want to convert an existing column data
> type from integer to numeric and it's taking a long time. The size of the
> table is ~50GB and the table has ~150million rows in it and it's not
> partitioned. We tried running the direct alter and it's going beyond hours,
> so wanted to understand from experts what is the best way to achieve this?
>
>
Out of curiosity, why NUMERIC(15,0) instead of BIGINT?

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message yudhi s 2025-01-09 16:42:13 recovery error while running any statement
Previous Message veem v 2025-01-09 16:25:09 Alter table fast