Re: About dropped notifications

Поиск
Список
Период
Сортировка
От Chris Browne
Тема Re: About dropped notifications
Дата
Msg-id 60u0h8760t.fsf@dba2.int.libertyrms.com
обсуждение исходный текст
Ответ на About dropped notifications  (CSN <cool_screen_name90001@yahoo.com>)
Ответы Re: About dropped notifications  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
tgl@sss.pgh.pa.us (Tom Lane) writes:
> CSN <cool_screen_name90001@yahoo.com> writes:
>> I'm considering setting up a script that listens for
>> notifications for a table and if a row is deleted the
>> script will delete that row's corresponding files. If
>> there are thousands of rows in the table, and I do
>> "delete from table", or even "delete from table where
>> id >1000 and id<2000", will the script be notified of
>> the deletion of each and every row (and subsequently
>> be able to delete that row's files), or will only one
>> notify event be received (or some number less than the
>> actual number of rows deleted)?
>
> Depends where you are doing the notify from ... but I think
> with the current implementation, a transaction will emit only
> one notify per notify event name, even if NOTIFY is executed
> many times within the transaction.

An interesting question is whether or not the relevant tuple in
pg_listener gets invalidated once, or whether doing 2500 attempted
NOTIFY requests blows through 2500 copies.
--
"cbbrowne","@","cbbrowne.com"
http://www.ntlug.org/~cbbrowne/internet.html
"As  long as  each  individual is  facing  the TV  tube alone,  formal
freedom poses no threat to privilege."  --Noam Chomsky

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

Предыдущее
От: Mike Rylander
Дата:
Сообщение: Re: Select gives the wrong results
Следующее
От: "John Surnow"
Дата:
Сообщение: "GiST access is not concurrent"