Re: PostgreSQL 8.3.1 on FreeBSD 6.0 - accumulation of processes

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: ute <ute(at)centrum(dot)cz>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.3.1 on FreeBSD 6.0 - accumulation of processes
Date: 2006-03-21 18:49:15
Message-ID: 20060321184915.GL15742@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jim C. Nasby 2006-03-21 18:51:47 Re: Problem with the Connection
Previous Message Jim C. Nasby 2006-03-21 18:43:36 Re: use of <END> in psql