<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>191271</bug_id>
          
          <creation_ts>2007-09-04 17:12 0000</creation_ts>
          <short_desc>mail-filter/dspam-3.8.0-r4: Calls to vacuumdb in /etc/cron.daily/dspam.cron are redundant.</short_desc>
          <delta_ts>2007-09-10 04:07:02 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>manuel@mclure.org</reporter>
          <assigned_to>mrness@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>manuel@mclure.org</who>
            <bug_when>2007-09-04 17:12:55 0000</bug_when>
            <thetext>If dspam is configured using the postgresql back end, dspam.cron runs the pgsql_purge.sql script, and then runs vacuumdb on all affected tables. However, the last line in pgsql_purge.sql is &quot;VACUUM ANALYZE;&quot; which means that the complete database will be vacuumed anyway - the calls to vacuumdb are redundant.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2007-09-09 20:33:50 0000</bug_when>
            <thetext>Fixed in -r5 by removing vacuum command from pgsql_objects.sql.

It might seem the wrong way of fixing it, but I prefer doing things in a consistent manner and cron script is the one who optimize the databases (see mysql and sqlite cleaning procedures).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>manuel@mclure.org</who>
            <bug_when>2007-09-10 03:44:47 0000</bug_when>
            <thetext>OK. There&apos;s still a problem in that the script is using &quot;vacuum -f&quot; which does the equivalent of a VACUUM FULL. This is unnecessary on a highly updated table since the space freed up by a plain VACUUM will be reused. Also, a VACUUM FULL puts a lock on the whole table, which means that all dspam requests will fail during the vacuum. Per the PostgreSQL docs: &quot;The FULL option is not recommended for routine use, but may be useful in special cases.&quot; Also, if an administrator has configured their PostgreSQL server to include vacuum delays so that a running vacuum has less effect on running queries, this means that the dspam tables may be unavailable for  hours on a large database (this is my case.)

Do you want me to enter a new bug for this?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2007-09-10 04:07:02 0000</bug_when>
            <thetext>Fixed in -r6 by running vacuumdb -z instead -f.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>