Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6669E9F926B for ; Wed, 17 Oct 2007 11:35:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 28712-10 for ; Wed, 17 Oct 2007 11:35:19 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by postgresql.org (Postfix) with ESMTP id 5AE979FB282 for ; Wed, 17 Oct 2007 11:35:19 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id u77so4966668pyb for ; Wed, 17 Oct 2007 07:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=u8kdOORfofq7FGqJM2WPND1G04xCYZcmGBzPO7aQ2Fk=; b=QILyfOcx7B8dimUCZJc66rDBDRATbrY4veCg+KKKSrl6gESX6BhxecwiWqB/33digcR/IFfNFNmuf2TCPRhry0km9yNQNEszlChZK2brJbsFPPKvks1xgl0qy1ADOcBw/2sVZaItYbKO88HDM0ZhXYlVSeJai+mDgaZGbx1qGxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iOuYf6qFDMHMK9uojNGYkGueWzq1jUHpHnQr7/YFMpM6CjMQS5T5vJF7UTniNIjYyzcLD5VIZ8ATFsYb+J/K9de66dN6UUveeF+zJnbWxuGtEGCYapMknEIBkSzOtXzdqjFP3pZeNWxx4gDevETcCAqhGsWdEg/GzDSUC7fY1qw= Received: by 10.35.91.10 with SMTP id t10mr10580297pyl.1192631716821; Wed, 17 Oct 2007 07:35:16 -0700 (PDT) Received: by 10.35.27.16 with HTTP; Wed, 17 Oct 2007 07:35:16 -0700 (PDT) Message-ID: <290a5abc0710170735w601b8336v2645e90a54be0e10@mail.gmail.com> Date: Wed, 17 Oct 2007 16:35:16 +0200 From: "Stefano Dal Pra" To: "=?ISO-8859-1?Q?St=E9phane_Schildknecht?=" Subject: Re: Vacuum goes worse Cc: "pgsql-performance@postgresql.org" In-Reply-To: <4715F2ED.20604@postgresqlfr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <47147AD8.9010704@postgresqlfr.org> <15640.1192544768@sss.pgh.pa.us> <4714D817.30701@postgresqlfr.org> <18249.1192550596@sss.pgh.pa.us> <4715F2ED.20604@postgresqlfr.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/203 X-Sequence-Number: 27225 Your first post says vacuum goes worse (slower). I see that you do not issue the -f option (FULL VACUUM). I had a similar situation with a server (with frequent update) performing nightly vacuumdb. After a few many days it went slower and slower. The first solution was to add the -f switch. Note that it leads to table lock (see docs :-) the FULL option completely rewrite the table on disk making it much more compact (i think of it similar to a "defrag" on windows). I had a dramatic speed improvement after the first vacuum full. latest solution (psql 8.0.1) was a perl script which selectively chooses tables to full vacuum basing on results from this select: SELECT a.relname, a.relpages FROM pg_class a ,pg_stat_user_tables b WHERE a.relname =3D b.relname order by relpages desc; this was to see how much a table's size grows through time. With psql 8.2.x we adopted pg_autovacuum which seems to perform good, even thought i do not clearly understand whether it occasionally performs a full vacuum (i think he does'nt). Stefano On 10/17/07, St=E9phane Schildknecht wrote: > Tom Lane a =E9crit : > > "Scott Marlowe" writes: > > > >> On 10/16/07, St=3DE9phane Schildknecht > >> wrote: > >> > >>> That's also why I am so disappointed vacuum doesn't give me these 4 > >>> hints lines. > >>> > > > > > >> What kind of error, or output, does it give you at the end? Any hint > >> as to why they're missing? > >> > > > > If you're talking about the FSM statistics display, that only gets > > printed by a database-wide VACUUM (one that doesn't name a specific > > table). > > > > Yes, I am. The command line is (in a shell script whom ouput is > redirected in a global file) : > > vacuumdb -d $DBNAME -p $DBPORT -U $DBUSR -z -v > > > That does not explain why we don't get FSM statitics display. The output > ends with: > INFO: vacuuming "public.sometable" > INFO: "sometable": removed 62 row versions in 3 pages > DETAIL: CPU 0.00s/0.00u sec elapsed 0.00 sec. > INFO: "sometable": found 62 removable, 5 nonremovable row versions in 5 > pages > DETAIL: 0 dead row versions cannot be removed yet. > There were 534 unused item pointers. > 0 pages are entirely empty. > CPU 0.00s/0.00u sec elapsed 0.00 sec. > INFO: analyzing "public.sometable" > INFO: "sometable": scanned 5 of 5 pages, containing 5 live rows and 0 > dead rows; 5 rows in sample, 5 estimated total rows > VACUUM > > Best regards, > > St=E9phane > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match >