Re: [HACKERS] Proposal for async support in libpq

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Proposal for async support in libpq
Дата
Msg-id 199804190212.WAA08376@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Proposal for async support in libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Proposal for async support in libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Proposal for async support in libpq  (Peter T Mount <psqlhack@retep.org.uk>)
Список pgsql-hackers
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > In backend/libpq/pqcomm.c, I see pg_sendoob() which sends out-of-band
> > data FROM the backend TO the client, but it is not called from anywhere.
> > This could be a method of signaling that a notification was pending, and
> > sending out-of-band data FROm the client TO the backend could be used
> > for cancelling a query.
>
> I don't see any real need to issue outgoing notifications as OOB data.
> If the client needed to interrupt current processing to handle a notify,
> then maybe it'd be useful, but how likely is that?  Keep in mind that
> the backend currently delays notify reports until end of transaction.
> I don't think we really want to change that...

Well, if you are trying to prevent from sending queries through libpq to
see if you have any notifications, how will you get notification without
an OOB-generated signal?  The notification would have to come through a
packet from the backend, and I thought you didn't want to have to deal
with that?

>
> This brings up another issue that I meant to ask about before: exactly
> what is the relation between interfaces/libpq and backend/libpq?  It
> sorta looks like they were once the same code.  Why were they allowed to
> become different, and is there any point in trying to unify them again?

interfaces/libpq is the client side, and backend/libpq is the server
side.  One sends queries, the other passes them to the backend
internals.  There has been some effort to merge code that is common to
both, but the definately don't do the same thing.


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Proposal for async support in libpq
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [DOCS] FAQ organization