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.