pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Smith <gsmith@gregsmith.com>
Cc: Gauri Kanekar <meetgaurikanekar@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Replication Syatem
Date: Tue, 29 Apr 2008 10:16:02 -0400
Message-ID: <873.1209478562@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.GSO.4.64.0804290347560.20575@westnet.com>
References: <7e4ba9550804280638ie81dc23w472785c83cd38fcf@mail.gmail.com>
	<a2de01dd0804280658t68ac22dsf182d304a94de5a2@mail.gmail.com>
	<7e4ba9550804280705q43c51e66l104a5ff9272bbd4d@mail.gmail.com>
	<20080428162243.GN2970@commandprompt.com>
	<7e4ba9550804282246p73c62fc6y5e7cb7dda55a6b50@mail.gmail.com>
	<Pine.GSO.4.64.0804290347560.20575@westnet.com>

Greg Smith <gsmith@gregsmith.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



view thread (48+ messages)  latest in thread

Message-ID: <873.1209478562@sss.pgh.pa.us>
Permalink:  ../873.1209478562@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/873.1209478562@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gsmith@gregsmith.com, meetgaurikanekar@gmail.com
  Subject: Re: Replication Syatem
  In-Reply-To: <873.1209478562@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox