Re: change bigint column to int - Mailing list pgsql-admin

From Evan Bauer
Subject Re: change bigint column to int
Date
Msg-id 117C35AF-8395-4D7F-842B-A63B7141269B@mac.com
Whole thread Raw
In response to change bigint column to int  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
Responses Re: change bigint column to int  (Mariel Cherkassky <mariel.cherkassky@gmail.com>)
List pgsql-admin
Mariel,

Just run a query and make certain that all values currently stored in the column fit in 4 bytes (+/- 2,147,483,648) before doing the ALTER.

Cheers,

Evan

Sent from my iPhone

On Nov 1, 2018, at 06:20, Mariel Cherkassky <mariel.cherkassky@gmail.com> wrote:

Hi,

I want to change the column type from bigint to int to save space. By doing so, does it include some risks ? As I see it, I should only run vacuum full afterwards if I want to return space to the os right ?

pgsql-admin by date:

Previous
From: Mariel Cherkassky
Date:
Subject: Re: change bigint column to int
Next
From: Mariel Cherkassky
Date:
Subject: Re: change bigint column to int