Re: Review: Extra Daemons / bgworker

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Review: Extra Daemons / bgworker
Дата
Msg-id 20121130125720.GB4542@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Review: Extra Daemons / bgworker  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Ответы Re: Review: Extra Daemons / bgworker
Список pgsql-hackers
Dimitri Fontaine wrote:
> Markus Wanner <markus@bluegap.ch> writes:
> > AFAICS pgqd currently uses libpq, so I think it would rather turn into
> > what I call a background worker, with a connection to Postgres shared
> > memory. I perfectly well see use cases (plural!) for those.
> >
> > What I'm questioning is the use for what I rather call "extra daemons",
> > that is, additional processes started by the postmaster without a
> > connection to Postgres shared memory (and thus without a database
> > connection).
>
> I totally missed the need to connect to shared memory to be able to
> connect to a database and query it. Can't we just link the bgworkder
> code to the client libpq library, just as plproxy is doing I believe?

One of the uses for bgworkers that don't have shmem connection is to
have them use libpq connections instead.  I don't really see the point
of forcing everyone to use backend connections when libpq connections
are enough.  In particular, they are easier to port from existing code;
and they make it easier to share code with systems that still have to
support older PG versions.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Re: missing LockBuffer(buffer, BUFFER_LOCK_SHARE) in trigger.c GetTupleForTrigger?