Re: Pre-forking backend
mlw <markw@mohawksoft.com>
From: mlw <markw@mohawksoft.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2001-09-29T18:50:25Z
Lists: pgsql-hackers
Bruce Momjian wrote: > > How hard would it be to pre-fork an extra backend for the database a > user just requested so if they next user asks for the same database, the > backend would already be started? The only problem I could see is the socket. The pre-forked() back-end would have to do the accept() for the new connection, but you could always have a forked process waiting to go in the accept() routine. When it accepts a new socket, it sends a signal off to the parent back-end to fork() over (couldn't resist) a new backend. That way there would be no fork() over head for new connections.