Re: LISTEN considered dangerous

Поиск
Список
Период
Сортировка
От Flemming Frandsen
Тема Re: LISTEN considered dangerous
Дата
Msg-id Pine.LNX.4.44.0608030040030.22172-100000@partyticket.net
обсуждение исходный текст
Ответ на Re: LISTEN considered dangerous  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LISTEN considered dangerous
Список pgsql-general
On Wed, 2 Aug 2006, Tom Lane wrote:

> Flemming Frandsen <ff@partyticket.net> writes:
> > The listen should simply listen for events issued at the start of the
> > transaction it's executed in.
>
>     BEGIN;
>     SELECT sleep(1000000000);
>     LISTEN foo;
>
> No, I don't think so.

And why would that be a problem?

There is no reason to assume that there would be any overhead in storing a
list of outstanding events for your connection compared to today.


What would happen in your example is that all the other connections leave
this slow transaction behind, but in stead of storing all the events for
all the transactions you can simply merge them all into one lump of events
that are waiting to be delivered to that slow client.




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

Предыдущее
От: Flemming Frandsen
Дата:
Сообщение: Re: LISTEN considered dangerous
Следующее
От: Flemming Frandsen
Дата:
Сообщение: Re: LISTEN considered dangerous