Re: ALTER TABLE DROP COLUMN

From: Don Baccus <dhogaza(at)pacifier(dot)com>
To: The Hermit Hacker <scrappy(at)hub(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: ALTER TABLE DROP COLUMN
Date: 2000-10-10 00:30:20
Message-ID: 3.0.1.32.20001009173020.01611260@mail.pacifier.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 07:55 PM 10/9/00 -0300, The Hermit Hacker wrote:

>> I am not convinced that a 2x penalty for DROP COLUMN is such a huge
>> problem that we should give up all the normal safety features of SQL
>> in order to avoid it. Seems to me that DROP COLUMN is only a big
>> issue during DB development, when you're usually working with
>> relatively small amounts of test data anyway.
>
>Actually, I could see DROP COLUMN being useful in a few other places
>... recently, I spent several hours re-structuring a clients database that
>had been built by someone else who didn't know what 'relational' means in
>RDBMS ... or how about an application developer that decides to
>restructure their schema's in a new release and provides an 'upgrade.sql'
>script that is designed to do this?

This last example is one reason DROP COLUMN would be a great help to
the OpenACS development effort.

However, upgrades (new releases) are fairly infrequent, and many users of
current versions won't bother unless they've run into toolkit bugs
(same goes for updating PG). Those who do know that doing an upgrade
will require planning, testing on a system that's not running their
"live" website, and some amount of downtime.

So I don't think a 2x penalty is a huge problem.

>That would make for a very painful upgrade process if I have to go through
>the trouble of upgrading my hardware to add more space ...

For many folks, if eating 2x the size of a single table runs their system out
of disk space, clearly they should've upgraded long, long ago. An OpenACS
site has hundreds of tables, I can't imagine running my disk space so tight
that I couldn't double the size of one of them long enough to do a DROP
COLUMN.

Obviously, some folks doing other things will have single tables that are
huge,
but after all they can always do what they do now - not drop columns.

- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, Pacific Northwest
Rare Bird Alert Service and other goodies at
http://donb.photo.net.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Horst Herb 2000-10-10 00:32:40 generic triggers - implementation request
Previous Message Bruce Momjian 2000-10-10 00:17:14 Re: [GENERAL] Using BLOBs with PostgreSQL