Re: alter table type from double precision to real - Mailing list pgsql-general

From Robert Treat
Subject Re: alter table type from double precision to real
Date
Msg-id 200706250823.49609.xzilla@users.sourceforge.net
Whole thread Raw
In response to Re: alter table type from double precision to real  (ssoo@siliconfile.com)
List pgsql-general
On Monday 25 June 2007 03:35, ssoo@siliconfile.com wrote:
> Michael Fuhr <mike@fuhr.org> wrote:
> > Altering a column's type rewrites the table so vacuuming afterward
> > shouldn't be necessary.
>
> I'm gonna alter another table type from double precision to real.
> This table size is lager than disk free space.
> Can it be possible?
> Previsouly, I saw continuous increasing in disk usage until
> alter complete.
> I'm afraid of disk full and aftereffects.

Correct, modifying table data types requires a table re-write, so you're
likely to run out of space.  You're not too likely to have much trouble by
trying, when you run out of disk space the transaction will roll back and you
should be ok.  One method to try and get around this might be to drop and
then recreate relevant indexes (thereby freeing up space ahead of time)
though you'll need to commit between those commands. HTH

--
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL

pgsql-general by date:

Previous
From: Gregory Stark
Date:
Subject: Re: alter table type from double precision to real
Next
From: Robert Treat
Date:
Subject: Re: Experiences of PostgreSQL on-disk bitmap index patch