Re: dead tuples and VACUUM - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: dead tuples and VACUUM
Date
Msg-id 20030531202414.GA2845@wolff.to
Whole thread Raw
In response to dead tuples and VACUUM  (Dima Tkach <dmitry@openratings.com>)
List pgsql-general
On Sat, May 31, 2003 at 14:15:04 -0400,
  Dima Tkach <dmitry@openratings.com> wrote:
>
> First of all, it is my understanding that this monthly job will
> double the size of the table (create a copy of every tuple it is
> updating). Is that right?

Yes.

> Now, if I run VACUUM on that table, it is supposed to reclaim those dead
> tuples.. Will it actually? I remember some discussions about 7.2, where
> it was mentioned that plain (not FULL) VACUUM doesn't move rows between
> pages (so, it seems to me, that if every row is updated, plain vacuum is
>  useless). Is it any better in 7.3? Or does it still have to be VACUUM
> FULL?

You need to make sure FSM is set large enough to plain vacuum to recover
all of the tuples.

> And finally, if I do *not* run VACUUM, and let it just sit there with
> the doubled number of tuples, what will happen next month, when every
> row gets updated again? Will it be able to reuse the dead tuples then,
> or will it just keep creating the new ones?

If you don't run even plain vacuum the deleted tuples won't be reused.
If you have run plain vacuum with FSM set high enough the free space
will be reused.

pgsql-general by date:

Previous
From: PeterKorman
Date:
Subject: Re: Slashdot: SAP and MySQL Join Forces
Next
From: Andrew Sullivan
Date:
Subject: Re: dead tuples and VACUUM