Re: 大表修改字段类型

From: Huang Bambo <bambo(dot)huang(at)gmail(dot)com>
To: charles meng <xlyybz(at)gmail(dot)com>
Cc: pgsql-zh-general(at)lists(dot)postgresql(dot)org
Subject: Re: 大表修改字段类型
Date: 2020-12-04 00:56:34
Message-ID: CAPTvEdo=jx7Tup619=LS0uyd-y53nE_DSN7pQDwRKpy4nrO2kA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-zh-general

估计copy出来,建新表再copy进去是最快的了。

On Thu, Dec 3, 2020 at 1:29 PM charles meng <xlyybz(at)gmail(dot)com> wrote:

> 各位好:
>
> 由于历史原因,我们有张表已经有16亿的数据量了,并且主键使用的是integer类型,很快就会达到该类型的最大值;
> 现在需要将该字段调整为bigint,请问有什么好的方案吗?
>
>
> 提前感谢
>

In response to

Browse pgsql-zh-general by date

  From Date Subject
Next Message Wen Yi 2023-06-04 09:10:25 Why my mail can't send to "pgsql-zh-general"<pgsql-zh-general@lists.postgresql.org>?
Previous Message charles meng 2020-12-03 05:28:55 大表修改字段类型