Re: LISTEN considered dangerous

From: Oisin Glynn <me(at)oisinglynn(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Flemming Frandsen <ff(at)partyticket(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: LISTEN considered dangerous
Date: 2006-08-02 13:15:46
Message-ID: 44D0A582.9070908@oisinglynn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Flemming Frandsen <ff(at)partyticket(dot)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.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
I was just about to say that if someone was to do the following they
would get the previously commited state of foo after the sleep not how
foo looked before the sleep otherwise every begin would need an entire
DB snapshot to be taken? Seems like it should be no different. I have
been following this thread as I use LISTEN but not in as intensive way
as the op and for me its working fine...

BEGIN
select sleep(100000);
select * from foo;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2006-08-02 13:37:01 Re: ECPG and COPY
Previous Message Harald Armin Massa 2006-08-02 13:05:12 Re: when do pg_temp SCHEMAS get purged?