Re: Pre-forking backend - new idea
mlw <markw@mohawksoft.com>
From: mlw <markw@mohawksoft.com>
To:
Cc: Bruce Momjian <pgman@candle.pha.pa.us>,
Peter Eisentraut <peter_e@gmx.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2001-10-15T21:05:05Z
Lists: pgsql-hackers
(I'm having trouble with e-mail, so if you get this twice, sorry) I was looking at some Oracle configuration files today, and it occurred to me how Postgres can be made to pre-fork, similarly to Oracle. Oracle has "listener" processes that listen on a port for Oracle clients. The listeners are configured for a database. Postgres could work the same way. It could start up on port 5432 and work as it always has, and, in addition, it could read a configuration script which directs it to "pre-fork" listeners on other ports, one port per database. This would work because they already know the database that they should be ready to use. The back-end does not need to be involved. Once you connect to the pre-forked back end, it will already be ready to perform a query because it has already loaded the database. The file which configures the "pre-forked" database could also contain run-time changeable tuning options for each "pre-forked" instance, presumably, because you would tune it for each database on which it would operate.