Storage space lost during an UPDATE

From: Vitaly Belman <vitalyb(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Storage space lost during an UPDATE
Date: 2004-07-03 13:37:56
Message-ID: fa96e3c6040703063768b2bc2e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I ran the following query on my database:

---------------
update bv_descriptions set description = REPLACE(description, '\\n', '\n');
commit;
---------------

It finished fine but to my surprise when I ran "df" on the server the
drive usage jumped from 44% to 60% which is additional 650MB.

I tried to restart the server but it didn't do any good, eventually I
tried to do a FULL VACUUM on that table and it did the trick and
cleaned the lost space.

I am still confused about what happened... What took these additional 650MB?

I could understand this phenomenon if it happened before I did
COMMIT... But why did it stay after COMMIT too?

Thanks

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-07-03 15:24:32 Re: createlang doesn't work
Previous Message R.Welz 2004-07-03 12:51:29 createlang doesn't work