From: | Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com> |
---|---|
To: | Mariel Cherkassky <mariel(dot)cherkassky(at)gmail(dot)com> |
Cc: | pgsql-admin(at)lists(dot)postgresql(dot)org |
Subject: | Re: change bigint column to int |
Date: | 2018-11-01 11:07:11 |
Message-ID: | CAGDYbUP9J9EuKWyYxF9UA_xiKjsoewQmADKHCt8ywYPqY7vt=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Hi Mariel,
After changing the column bigint to int size get reduced.
But it has two huge and interrelated problems: locking and time. This
approach locks the table for as long as the command takes to run. And by
lock, taking a heavy “access exclusive” lock which shuts everything else
out of the table. If your table is small, this is not an issue.
On Thu, Nov 1, 2018 at 3:51 PM Mariel Cherkassky <
mariel(dot)cherkassky(at)gmail(dot)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 ?
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Mariel Cherkassky | 2018-11-01 11:12:26 | Re: change bigint column to int |
Previous Message | Mariel Cherkassky | 2018-11-01 10:20:52 | change bigint column to int |