dead tuples and VACUUM - Mailing list pgsql-general

From Dima Tkach
Subject dead tuples and VACUUM
Date
Msg-id 3ED8F128.4060205@openratings.com
Whole thread Raw
Responses Re: dead tuples and VACUUM  (Bruno Wolff III <bruno@wolff.to>)
Re: dead tuples and VACUUM  (Andrew Sullivan <andrew@libertyrms.info>)
List pgsql-general
Hi, everybody!

I wanted to ask a few questions about VACUUM, and dead tuples in general

Suppose, I have a table with a few million rows, and every now and then
(say, monthly) every row in the table is updated.

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?

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?

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?

My problem is that, as I described above, I am afraid that plain VACUUM
just won't help, and running VACUUM FULL takes *days* on my database,
and we just cannot afford that much downtime (in fact, it is quicker,
for some reason to dump and reload the table then to vacuum full it!).

I'd love to hear what you guys know about it!

Thanks a lot!

Dima


pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: psql: FATAL: Missing or erroneous pg_hba.conf file
Next
From: PeterKorman
Date:
Subject: Re: Slashdot: SAP and MySQL Join Forces