Re: LISTEN/NOTIFY race condition?

Поиск
Список
Период
Сортировка
От Laurent Birtz
Тема Re: LISTEN/NOTIFY race condition?
Дата
Msg-id 47CECE09.10306@kryptiva.com
обсуждение исходный текст
Ответ на Re: LISTEN/NOTIFY race condition?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: LISTEN/NOTIFY race condition?  (Laurent Birtz <laurent.birtz@kryptiva.com>)
Список pgsql-bugs
Tom Lane wrote:
> Laurent Birtz <laurent.birtz@kryptiva.com> writes:
>
>>  From the observed sequence of events, it would appear that the event
>> thread inserts a tuple in the pg_listener table BEFORE the command thread
>> actually commits the transaction. However, when this transaction commits,
>> Postgres does not actually find the event thread's tuple in this table.
>>
>
> I'm wondering exactly when you commit the LISTEN?  The command thread
> can't see the pg_listener tuple until it's committed ...
>
I'm executing the LISTEN statement outside a transaction block.
I presume Postgres implicitly adds the BEGIN and COMMIT
statements in that case?

Just to be clear, the SELECT statement that retrieve new events is
also executed outside a transaction block.

Thanks for the help,
Laurent Birtz

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

Предыдущее
От: Rodriguez Fernando
Дата:
Сообщение: Re:
Следующее
От:
Дата:
Сообщение: Tom Belich