Backend shutdown time?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Backend shutdown time?
Date: 2002-01-25 04:38:22
Message-ID: 23339.1011933502@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We know that backend startup time is something we'd like to cut down as
much as possible, but has anyone ever looked at backend *shutdown* time?

I'm sitting here watching Michael Devogelaere's benchmark with "top",
and despite the fact that there's only one client process at a time,
there's frequently two or three backends running. Sometimes four.
The only way I can see to explain this is that it takes a fair amount
of time for the backend to exit after the client disconnects.

Sample "ps -ef" run showing four active backends and one client:

tgl 17647 1 1 21:18 ? 00:02:31 postmaster -i -F
tgl 24844 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd
tgl 24852 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd
tgl 24856 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd
tgl 24859 17113 0 23:29 pts/1 00:00:00 /home/tgl/qmail/qmail-getpw alia
tgl 24860 17647 0 23:29 ? 00:00:00 postgres: userconsult_test userd

While it clearly takes some amount of time to clean out our entries in
the PROC array, etc, this trace suggests that the cost is a lot higher
than one would've expected. Anyone have an idea what's going on here?

(BTW, the above processes are 7.1.3, but I doubt 7.2 is better.)

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-25 04:42:56 Re: Backend shutdown time?
Previous Message Jan Wieck 2002-01-25 04:35:15 Re: PostgreSQL crashes with Qmail-SQL