Re: storage calculations

From: pgboy(at)guthrie(dot)charm(dot)net
To: Andrew Sullivan <andrew(at)libertyrms(dot)info>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: storage calculations
Date: 2003-07-31 17:41:54
Message-ID: Pine.LNX.4.50.0307311332490.31827-100000@guthrie.charm.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, 31 Jul 2003, Andrew Sullivan wrote:

> On Thu, Jul 31, 2003 at 08:51:09AM -0400, pgboy(at)guthrie(dot)charm(dot)net wrote:
> >
> > well, i can admit that i am confused. my assumption is that when a row
> > is deleted in pg, that row is merely marked as 'gone' until a vacuum-full
> > is done. my further assumption is that if i continue to add rows, those
> > rows are not necessarily appended to the end of the physical data file,
> > but can be written over 'deleted' rows.
>
> Your assumption is wrong. VACUUM without FULL will allow you to
> write over the free space now available in your data files, subject
> to the limitations of tracking as determined by your FSM settings.
>
> VACUUM FULL actually shortens the data file. Except for cases having
> to do with large tuples that won't fit in the previous page, VACUUM
> FULL means that you can't fit any more data in that file, once the
> VACUUM FULL is done.
>
> A
>
>

well, i was close. i didn't realize that i had to do a (non-full)
vacuum to mark deleted space as free.

but after that, i am still left with a potentially sparse file
and i don't really have a way to guess how much free space is
available until i do a full vacuum, correct? (at which time the
file size(s) will indicate the amount being used)

just started looking at fsm. thanks for the pointer there. i hope
i'm not acting too obtuse here.

thanks.
pg

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Daniel Gerardo Lucero Baylon 2003-07-31 19:00:49 Starting PostgreSQL server as root
Previous Message Andrew Sullivan 2003-07-31 16:58:20 Re: storage calculations