| From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
|---|---|
| To: | tonester(at)ccom(dot)net (Tony Rios) |
| Cc: | sthomas(at)cise(dot)ufl(dot)edu, pgsql-hackers(at)postgreSQL(dot)org |
| Subject: | Re: [HACKERS] database size |
| Date: | 1998-01-07 01:16:34 |
| Message-ID: | 199801070116.UAA06828@candle.pha.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> Just wondering.. did you happen to do an INSERT into the database,
>
> then delete some rows.. say 19megs worth, then re-add... From what I've
>
> seen msql db's will always be at least the size of the largest you've ever
>
> had the database before. It will over time, overrite existing deleted
>
> records, but it keeps the data still in there, just sets a delete flag.
>
>
> If you really need to cut the size down, I've had to delete the database
>
> completely, then create another table from scratch. Not sure if there
>
> is a 'purge' type function available, but you have to be careful that
>
> nobody is accessing the db at that time, since it's very sensitive at
>
> that time.
>
Thanks to Vadim, vacuum shrinks the size to the exact amount needed to
store the data. Also, the table is locked while vacuuming, so no one
can accidentally access it.
--
Bruce Momjian
maillist(at)candle(dot)pha(dot)pa(dot)us
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 1998-01-07 01:18:26 | Re: [HACKERS] database size |
| Previous Message | Shiby Thomas | 1998-01-07 01:10:39 | Re: [HACKERS] database size |