Alter the column data type of the large data volume table.

From: charles meng <xlyybz(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Alter the column data type of the large data volume table.
Date: 2020-12-03 06:53:35
Message-ID: CAD5cqMJT9Q=U3EkpgjsL5QcHNXfwvHVHe+RBabZBXh4OW9n8AA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I have a table with 1.6 billion records. The data type of the primary key
column is incorrectly used as integer. I need to replace the type of the
column with bigint. Is there any ideas for this?

Solutions that have been tried:
Adding temporary columns was too time-consuming, so I gave up.
Using a temporary table, there is no good way to migrate the original table
data to the temporary table

Thanks in advance.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Krüger 2020-12-03 09:32:28 Postgres C-API: How to get the Oid for a custom type defined in a schema outside of the current search path
Previous Message Ron 2020-12-03 01:51:00 Re: pg_dump of partitioned table not working.