Bacula-users

Re: [Bacula-users] Better way to garbage collect postgresql database

2009-03-21 00:42:44
Subject: Re: [Bacula-users] Better way to garbage collect postgresql database
From: Kevin Keane <subscription AT kkeane DOT com>
Date: Fri, 20 Mar 2009 21:34:37 -0700
Hemant Shah wrote:
>
>
> --- On Fri, 3/20/09, Jesper Krogh <jesper AT krogh DOT cc> wrote:
>
>   
>> From: Jesper Krogh <jesper AT krogh DOT cc>
>> Subject: Re: [Bacula-users] Better way to garbage collect postgresql database
>> To: hjrrs AT yahoo DOT com
>> Cc: "baculausers" <bacula-users AT lists.sourceforge DOT net>
>> Date: Friday, March 20, 2009, 12:30 AM
>> Hemant Shah wrote:
>>     
>>> This is a database question, but I figured some of the
>>>       
>> bacula users may have 
>>     
>>> come across this problem so I am posting it here.
>>>
>>> Every monday I run following commands to check and
>>>       
>> garbage collect bacula database:
>>     
>>> dbcheck command
>>> vacuumdb -q -d bacula -z -f
>>>       
>> There is absolutely no reason to "vacumm full"
>> unless your data-size actually are shrinking over time.
>> (longer periods). A normal vacuum will make it available for
>> the next run.. you most likely are running autovacuum
>> anyway.
>>     
>
>   Yes, I do run autovacuum, but I just start using postgresql and I am not 
> sure how efficient it is in space usage. I was afraid that the data would be 
> fragmented if it re-uses the free space.
>   
The opposite is true, actually. When there is no free space left in the 
database, postgres has no choice but to append new data at the end, 
regardless of where the remaining table data is stored. When you let 
postgres manage the free space, it can pick the space most appropriate 
for storing any particular piece of data, and minimize fragmentation.

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users