Re: Replication Syatem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: Gauri Kanekar <meetgaurikanekar(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Replication Syatem
Date: 2008-04-29 14:16:02
Message-ID: 873.1209478562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Greg Smith <gsmith(at)gregsmith(dot)com> writes:
> The model here assumes that you'll need that space again for the next time
> you UPDATE or INSERT a row. So instead VACUUM just keeps those available
> for database reuse rather than returning it to the operating system.

> Now, if you don't VACUUM frequently enough, this model breaks down, and
> the table can get bigger with space that may never get reused. The idea
> is that you should be VACUUMing up now unneeded rows at about the same
> rate they're being re-used. When you don't keep up, the database can
> expand in space that you don't get back again. The right answer to this
> problem is not to use VACUUM FULL; it's to use regular VACUUM more often.

Also, you need to make sure you have the FSM parameters set high enough
so that all the free space found by a VACUUM run can be remembered.

The less often you run VACUUM, the more FSM space you need, because
there'll be more free space reclaimed per run.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-04-29 14:20:48 Re: Where do a novice do to make it run faster?
Previous Message Gregory Stark 2008-04-29 13:48:31 Re: Replication Syatem