Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGSzi-00031y-EN for pgsql-performance@postgresql.org; Tue, 25 Sep 2012 11:08:02 +0000 Received: from mail-we0-f174.google.com ([74.125.82.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TGSzg-0004ip-LA for pgsql-performance@postgresql.org; Tue, 25 Sep 2012 11:08:01 +0000 Received: by weyt9 with SMTP id t9so818751wey.19 for ; Tue, 25 Sep 2012 04:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=5kBR29csERozjDKEX1P2ODMY1RK8aJqLvC/RuV9QGhE=; b=sL/Pg0vahhjw36mZI7UXdAfkRZTGOXr3OsGT12Gvkbf/T3tGgK6WDp2m7sZRnXCkRf d/d/bveozNgbilk17tit/ewAKTFFN+Y4v1yoMDKZkmG33L6hmr+xK8y9fqwv3OsmmCdt qZe6NAeaSMZOZAf4PleXxRlBGhrUxImT5MqCcIi/b+WSoyIsYBy6huG2b5uiAxVgP9d2 WMQT/TCkCQ+nJk5g5VVm+w8s4V2SUOIxDoWtJOQHb992HBlkRlvCD9XBlIQWEo9P8TV3 b5kZBkXnlV5XdnVUsDcop1sftz4H1SN4zQAr4ObZcnJcsTUTejx/hTOI6DzxuMBF1lcq umYA== Received: by 10.180.100.37 with SMTP id ev5mr21082316wib.5.1348571279478; Tue, 25 Sep 2012 04:07:59 -0700 (PDT) Received: from [192.168.1.103] (kstr60.static.otenet.gr. [79.129.45.250]) by mx.google.com with ESMTPS id bc2sm26711wib.0.2012.09.25.04.07.57 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Sep 2012 04:07:58 -0700 (PDT) Subject: Re: Postgres becoming slow, only full vacuum fixes it Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Kiriakos Tsourapas In-Reply-To: <5060E7F2.3010903@catalyst.net.nz> Date: Tue, 25 Sep 2012 14:07:55 +0300 Cc: pgsql-performance@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <5060E7F2.3010903@catalyst.net.nz> To: Mark Kirkwood X-Mailer: Apple Mail (2.1278) X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201209/118 X-Sequence-Number: 47864 Hi Mark, When the problem appears, vacuuming is not helping. I ran vacuum = manually and the problem was still there. Only full vacuum worked. As far as I have understood, autovacuuming is NOT doing FULL vacuum. So, = messing around with its values should not help me in any way. Thanks >=20 > Given that vacuum full fixes the issue I suspect you need to have = autovacuum set wake up much sooner, not later. So autovacuum_naptime =3D = 28800 or even =3D 60 (i.e the default) is possibly too long. We have = several database here where I change this setting to 10 i.e: >=20 > autovacuum_naptime =3D 10s >=20 >=20 > in order to avoid massive database bloat and queries that get slower = and slower... >=20 > You might want to be a bit *less* aggressive with = autovacuum_vacuum_scale_factor - I usually have this at 0.1, i.e: >=20 > autovacuum_vacuum_scale_factor =3D 0.1 >=20 >=20 > otherwise you will be vacuuming all the time - which is usually not = what you want (not for all your tables anyway). >=20 > regards >=20 > Mark >=20 >=20 > --=20 > Sent via pgsql-performance mailing list = (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance