On Mon 15 Oct 2001 04:32, you wrote:
DBBalancer (http://www.sourceforge.net/projects/dbbalancer/) does something
like that.
>
> Create a small program that makes a few connections to postgresql, does
> some initialization, preconnects to various DBs (or maybe limited to one DB
> specified on
At 10:18 AM 15-10-2001 -0400, Tom Lane wrote:
>Lincoln Yeoh <[EMAIL PROTECTED]> writes:
>> Create a small program that makes a few connections to postgresql, does
>> some initialization, preconnects to various DBs (or maybe limited to one DB
>> specified on startup), and listens on one port/socket
(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 c
Lincoln Yeoh <[EMAIL PROTECTED]> writes:
> Create a small program that makes a few connections to postgresql, does
> some initialization, preconnects to various DBs (or maybe limited to one DB
> specified on startup), and listens on one port/socket. It might not even
> prefork, just cache connecti
How would authentication and access control be done with a preforking
backend? I personally find a preforking backend desirable, but that's just me.
But if people really want preforking how about not doing it in the backend.
Create a small program that makes a few connections to postgresql, does
> Bruce Momjian writes:
>
> > OK, let's assume we have pre-forked backends that do the accept(). One
> > enhancement would be for the child to connect to the last requested
> > database. If the accept() user wants the same database, it is already
> > connected, or at least its cache is loaded.
Bruce Momjian writes:
> OK, let's assume we have pre-forked backends that do the accept(). One
> enhancement would be for the child to connect to the last requested
> database. If the accept() user wants the same database, it is already
> connected, or at least its cache is loaded. If they wan
> Tom Lane wrote:
> > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > How hard would it be to pre-fork an extra backend
> >
> > How are you going to pass the connection socket to an already-forked
> > child process? AFAIK there's no remotely portable way ...
>
> One of the mechanisms I've
> Gavin Sherry <[EMAIL PROTECTED]> writes:
>
> > This aside, isn't it possible to just copy the socket and some
> > data about the database required into shared memory and have the preforked
> > children pick the socket up from there.
>
> Ummm No. There's no Unix API for doing so.
>
> You
At 08:16 PM 30-09-2001 -0600, Steve Wolfe 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?
>
> Perhaps I'm missing something, but it seems to m
> > >
> > > 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?
>
> Perhaps I'm missing something, but it seems to me that the cost of forking
> a new backend
> >
> > 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?
Perhaps I'm missing something, but it seems to me that the cost of forking
a new backend would be prett
>
> Once we have schemas (7.3, I hope), I think a lot of installations will
> have only one production database. However, if we were going to do this
> what we'd probably do is allow the DBA to configure the postmaster to
> start N pre-forked backends per database, where N can depend on the
> d
Bradley McLean <[EMAIL PROTECTED]> writes:
> Is it useful if it only works for one database within a server?
Once we have schemas (7.3, I hope), I think a lot of installations will
have only one production database. However, if we were going to do this
what we'd probably do is allow the DBA to c
Doug McNaught wrote:
>
> You can pass open file descriptors across Unix domain sockets on most
> systems, which is a possible way to address the problem, but probably
> not worth it for the reasons discussed earlier.
I think that it does solve the problem. The only drawback is that it's not
port
* Gavin Sherry ([EMAIL PROTECTED]) [010930 06:13]:
> On Sat, 29 Sep 2001 [EMAIL PROTECTED] wrote:
>
> > > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > > How hard would it be to pre-fork an extra backend
> > >
> > > How are you going to pass the connection socket to an already-forked
> > > chi
Gavin Sherry <[EMAIL PROTECTED]> writes:
> This aside, isn't it possible to just copy the socket and some
> data about the database required into shared memory and have the preforked
> children pick the socket up from there.
Ummm No. There's no Unix API for doing so.
You can pass open fil
On Sat, 29 Sep 2001 [EMAIL PROTECTED] wrote:
> > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > How hard would it be to pre-fork an extra backend
> >
> > How are you going to pass the connection socket to an already-forked
> > child process? AFAIK there's no remotely portable way ...
>
> Umm.
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > How hard would it be to pre-fork an extra backend
>
> How are you going to pass the connection socket to an already-forked
> child process? AFAIK there's no remotely portable way ...
Umm... Apache? They use a preforking model and it works quite w
At 04:50 PM 9/29/01 -0400, Tom Lane wrote:
>Bruce Momjian <[EMAIL PROTECTED]> writes:
>>> On some operating systems, only one child at a time can accept() on the
>>> socket. On these, you have to lock around the call to accept().
>
>> But how do you know the client wants the database you have for
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.
Bruce Momjian <[EMAIL PROTECTED]> writes:
>> On some operating systems, only one child at a time can accept() on the
>> socket. On these, you have to lock around the call to accept().
> But how do you know the client wants the database you have forked? They
> could want a different one.
This a
> Bruce Momjian wrote:
> > Tom Lane wrote:
> > > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > > How hard would it be to pre-fork an extra backend
> > >
> > > How are you going to pass the connection socket to an already-forked
> > > child process? AFAIK there's no remotely portable way ...
> >
Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <[EMAIL PROTECTED]> writes:
> > > How hard would it be to pre-fork an extra backend
> >
> > How are you going to pass the connection socket to an already-forked
> > child process? AFAIK there's no remotely portable way ...
>
> No idea but i
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
Bruce Momjian <[EMAIL PROTECTED]> writes:
> How hard would it be to pre-fork an extra backend
How are you going to pass the connection socket to an already-forked
child process? AFAIK there's no remotely portable way ...
regards, tom lane
---(end
> Bruce Momjian <[EMAIL PROTECTED]> writes:
> > How hard would it be to pre-fork an extra backend
>
> How are you going to pass the connection socket to an already-forked
> child process? AFAIK there's no remotely portable way ...
No idea but it seemed like a nice optimization if we could do it
27 matches
Mail list logo