X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0E0059DCC04 for ; Tue, 21 Mar 2006 14:49:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37753-02 for ; Tue, 21 Mar 2006 14:49:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 6ED6F9DCBC5 for ; Tue, 21 Mar 2006 14:49:15 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id A0CE55643A; Tue, 21 Mar 2006 12:49:15 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Tue, 21 Mar 2006 12:49:15 -0600 Date: Tue, 21 Mar 2006 12:49:15 -0600 From: "Jim C. Nasby" To: ute Cc: pgsql-admin@postgresql.org Subject: Re: PostgreSQL 8.3.1 on FreeBSD 6.0 - accumulation of processes Message-ID: <20060321184915.GL15742@pervasive.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060321:ute@centrum.cz::FsGG1KALJsuL2y9z:0002Vh6 X-Hashcash: 1:20:060321:pgsql-admin@postgresql.org::Qp7ZRcKqhTYySK/Y:00000000000 0000000000000000000000000h26 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.107 required=5 tests=[AWL=0.107] X-Spam-Score: 0.107 X-Spam-Level: X-Archive-Number: 200603/192 X-Sequence-Number: 20949 On Thu, Mar 16, 2006 at 05:17:47PM +0100, ute wrote: > Typical situation is, that ended sql commands not ends postmaster > processes. For example when I run vacuum full analyze some database, sql > command ends, but process not! Then I can see this: > > 62123 ?? D 0:22,24 postmaster: postgres b2c_100091 ::1(50512) > VACUUM (postgres) > 64332 ?? I 0:00,05 postmaster: b2c_100091 b2c_100091 ::1(64940) > SELECT waiting (postgres) > 64826 ?? S 0:00,06 postmaster: b2c_100091 b2c_100091 ::1(60703) > SELECT waiting (postgres) > 64904 ?? S 0:00,06 postmaster: b2c_100091 b2c_100091 ::1(58878) > SELECT waiting (postgres) > > Important is, that SQL command vacuum full analyze some database has > finished. I think, that when vacuum is finished, process > > 62123 ?? D 0:22,24 postmaster: postgres b2c_100091 ::1(50512) > VACUUM (postgres) And do you have reason to believe that process isn't ending when vacuum ends? Also, are you sure you need to be running vacuum full? It blocks access to each table as it runs, which will undoubtedly cause processes to back up waiting for access (which is exactly what that output of ps shows). My advice is to just let autovacuum handle things if at all possible. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461