From: | "Ken Hirsch" <kenhirsch(at)myself(dot)com> |
---|---|
To: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Pre-forking backend |
Date: | 2001-09-29 21:06:13 |
Message-ID: | 00f601c1492a$9443a600$87863dd0@hppav |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
>
> This approach would only work as far as saving the fork() call itself,
> not the backend setup time. Not sure it's worth the trouble. I doubt
> that the fork itself is a huge component of our start time; it's setting
> up all the catalog caches and so forth that's expensive.
On Unix, yeah, but on Windows, VMS, MPE/iX, possibly others, forking is
expensive. Even on Unix, you're not losing anything by this architecture.
The simple solution is to have wait on separate sockets and add a redirect
capability to the protocol. The program would be:
If the clients wants the database I have open,
great, we're in business
else if the client supports redirect,
do redirect
else if I can pass file descriptor on this OS,
pass file descriptor to the right process
else
throw away what we've done and open the right database.
Simple! It's just a small matter of programming.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-09-29 22:54:25 | Re: Glitch in handling of postmaster -o options |
Previous Message | Tom Lane | 2001-09-29 20:50:22 | Re: Pre-forking backend |