Re: [ADMIN] When postgres will be faster?

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: sk(dot)list(at)comset(dot)net
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [ADMIN] When postgres will be faster?
Date: 1999-12-02 15:20:14
Message-ID: Pine.BSF.4.21.9912021118090.6758-100000@thelab.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


This email is moved off of pgsql-admin and left only on pgsql-hackers,
where it belongs...

Sergei...we look forward to seeing patches that demonstrate, and possibly
implement, that which you are proposing...it would give us, I think, a
much clearer idea of what you are thinking :)

On Thu, 2 Dec 1999 sk(dot)list(at)comset(dot)net wrote:

> Hi!
>
> On 01-Dec-99 Bruce Momjian wrote:
> >> > postmaster forks() and does not do an exec().
> >>
> >> >From postmaster log:
> >>
> >> FindExec: found "/usr/comset/dbase/bin/postgres" using argv[0]
> >>
> >> ps ax|grep pos
> >>
> >> 10665 ? R 0:01 /usr/comset/dbase/bin/postgres main.comset.com polithit
> >> pol
> >> 13329 ? S 0:24 /usr/comset/dbase/bin/postmaster -i
> >> -D/usr/comset/dbase/dat
> >>
> >> These samples push me thinking it was fork/exec... :-(
> >
> > We re-exec the postmaster so it has an absolute path, which is sometimes
> > needed for dynamic loading. We also need 5 paramaters to we can do ps
> > display if forked backends.
>
> But you know several ways to send parameters to child process...
> So, You have:
> 1. Shared memory
> 2. Fifo file like /tmp/.s.PGSQL.ctl.pid-of-backend
> 3. Additional unnamed pipe opened for child
> 4. Signals like SIGUSR1 etc to force fetch parameters from somewhere.
>
> So, in addition I found thet there is not nessesary to create a dynamic list of
> child pool. You have static/dynamic linear array of backend running ;-). Waw!
> Possible to add some additional info to this structure about pooled backend (I
> offer before) to manage pool.
>
> I hope I dig postgresql code this weekend to have ideas offer for developers
> more constructively.
>
> I think p.3 shown before is preferable. The main() of backend should gentle
> read this pipe. Pipes in Unix have more that 1024 bytes buffer...
>
> while (readCommand(....)) {
> initBackend(...); // Same as parse args...
> doQuery(..);
> finishBackend(...);
> }
>
> readCommand() should use select() with timeout for check pipe. Then signal
> received it set flag on and select() loop may finish on it with 0 returned.
>
> SKiller
> --------------------------
> Sergei Keler
> WebMaster of "ComSet"
> E-Mail: skiller(at)comset(dot)net
> http://www.comset.net
> --------------------------
>
> ************
>

Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy(at)hub(dot)org secondary: scrappy(at){freebsd|postgresql}.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Lamar Owen 1999-12-02 15:29:38 Re: [HACKERS] perl-DBD-Pg (was Re: BOUNCE pgsql-ports@postgreSQL.org: Non-member submission from[Joe Brenner <doom@kzsu.stanford.edu>] (fwd))
Previous Message Joe Brenner 1999-12-02 11:41:46 Re: [HACKERS] perl-DBD-Pg (was Re: BOUNCE pgsql-ports@postgreSQL.org: Non-member submission from[Joe Brenner <doom@kzsu.stanford.edu>] (fwd))