Re: Deep integration of PostgreSQL with Apache

Поиск
Список
Период
Сортировка
От Robin Boerdijk
Тема Re: Deep integration of PostgreSQL with Apache
Дата
Msg-id 20050503151626.37630.qmail@web52405.mail.yahoo.com
обсуждение исходный текст
Ответ на Deep integration of PostgreSQL with Apache  (Robin Boerdijk <robin_boerdijk@yahoo.com>)
Ответы Re: Deep integration of PostgreSQL with Apache  (Alex Turner <armtuk@gmail.com>)
Re: Deep integration of PostgreSQL with Apache  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: Deep integration of PostgreSQL with Apache  (Thomas Hallgren <thhal@mailblocks.com>)
Список pgsql-general
--- Thomas Hallgren <thhal@mailblocks.com> wrote:
> Robin Boerdijk wrote:
> > Hi,
> >
> > Apologies if this has been discussed before, but I was wondering if
> > there have been any efforts in the past to provide a deep
> integration
> > of PostgreSQL with Apache. What I mean by deep integration is that
> the
> > PostgreSQL server logic runs inside the Apache server processes,
> rather
> > than separate processes. In particular, the postmaster server logic
> > would run inside the Apache master process and the postgres server
> > logic would run inside Apache child processes.
> >
> > The main advantage of this approach would be that it avoids the
> > Apache/PostgreSQL context switch when executing SQL requests from
> the
> > web server. It looks like the Apache server and PostgreSQL server
> > architectures are quite similar to make this feasible. Any
> thoughts?
> >
> The PostgreSQL backend is inherently single-threaded and a new
> process
> is forked each time you establish a new connection (session) so the
> integration you ask for is not in anyway possible unless you are
> content
> with one single database connection.

I agree that it is not trivial, but is it feasible? Specifically, I'm
thinking about the following approach:

1. Strip all networking logic and the logic that manages the postgres
child servers from the postmaster server. The logic that remains is
code that manages the auxiliary processes such as the bgwriter and
statistics collector. Integrate this remaining logic in the the Apache
master server.

2. Strip all networking logic from the postgres server. The logic that
remains is logic for executing queries against the database. Integrate
this remaining logic in the Apache child server.

The result of this is an integrated web/database server where all
networking is handled by Apache instead of postmaster/postgres. Other
than that, I see no difference with the way PostgreSQL works out of the
box. The Apache master server functions as the postmaster (i.e.
managing the child server processes) and the Apache child servers
function as the postgres servers (i.e. access the database). Why would
this web/database server be limited to using only one connection?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

В списке pgsql-general по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Deep integration of PostgreSQL with Apache
Следующее
От: Robin Boerdijk
Дата:
Сообщение: Re: Deep integration of PostgreSQL with Apache