Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 476022E0033 for ; Tue, 29 Apr 2008 12:01:12 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 20726-01 for ; Tue, 29 Apr 2008 12:01:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from yertle.kcilink.com (thingy.kcilink.com [74.92.149.59]) by developer.postgresql.org (Postfix) with ESMTP id 2F4512E002D for ; Tue, 29 Apr 2008 12:00:59 -0300 (ADT) Received: from host-121.int.kcilink.com (host-121.int.kcilink.com [192.168.7.121]) by yertle.kcilink.com (Postfix) with ESMTP id AA1ED8A150 for ; Tue, 29 Apr 2008 11:00:57 -0400 (EDT) Message-Id: <5C077297-F9AA-4890-87BF-DFBC677DEDFF@khera.org> From: Vivek Khera To: pgsql-performance Performance In-Reply-To: <873.1209478562@sss.pgh.pa.us> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: Replication Syatem Date: Tue, 29 Apr 2008 11:00:57 -0400 References: <7e4ba9550804280638ie81dc23w472785c83cd38fcf@mail.gmail.com> <7e4ba9550804280705q43c51e66l104a5ff9272bbd4d@mail.gmail.com> <20080428162243.GN2970@commandprompt.com> <7e4ba9550804282246p73c62fc6y5e7cb7dda55a6b50@mail.gmail.com> <873.1209478562@sss.pgh.pa.us> X-Mailer: Apple Mail (2.919.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.544 tagged_above=0 required=5 tests=AWL=-1.355, FS_REPLICA=1.179, SARE_SPEC_REPLICA=0.72 X-Spam-Level: X-Archive-Number: 200804/443 X-Sequence-Number: 29936 On Apr 29, 2008, at 10:16 AM, Tom Lane wrote: > Greg Smith 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. [ ... ] > 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. I can actually watch one of our applications slow down once the free space in the table is used up. Extending the data file seems to be much more expensive than using the free space found in existing pages of the file.