Re: listen/notify argument (old topic revisited)

Поиск
Список
Период
Сортировка
От nconway@klamath.dyndns.org (Neil Conway)
Тема Re: listen/notify argument (old topic revisited)
Дата
Msg-id 20020703151759.GA9656@klamath.dyndns.org
обсуждение исходный текст
Ответ на Re: listen/notify argument (old topic revisited)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: listen/notify argument (old topic revisited)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Jul 02, 2002 at 05:35:42PM -0400, Tom Lane wrote:
> 1. To send NOTIFY: grab write lock on shared-memory circular buffer.
> If enough space, insert message, release lock, send signal, done.
> If not enough space, release lock, send signal, sleep some small
> amount of time, and then try again.  (Hard failure would occur only
> if the proposed message size exceeds the buffer size; as long as we
> make the buffer size a parameter, this is the DBA's fault not ours.)

How would this interact with the current transactional behavior of
NOTIFY? At the moment, executing a NOTIFY command only stores the
pending notification in a List in the backend you're connected to;
when the current transaction commits, the NOTIFY is actually
processed (stored in pg_listener, SIGUSR2 sent, etc) -- if the
transaction is rolled back, the NOTIFY isn't sent. If we do the
actual insertion when the NOTIFY is executed, I don't see a simple
way to get this behavior...

Cheers,

Neil

-- 
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC




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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: listen/notify argument (old topic revisited)
Следующее
От: jtv
Дата:
Сообщение: Re: libpq++ build problems