Re: notification payloads

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: notification payloads
Дата
Msg-id 20070326164358.GD13471@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: notification payloads  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: notification payloads  (Andrew Dunstan <andrew@dunslane.net>)
Re: notification payloads  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Andrew Dunstan wrote:

> Let's say we provide 100Kb for this (which is not a heck of a lot) , 
> that the average notification might be, say, 40 bytes of name plus 60 
> bytes of message. Then we have room for about 1000 messages in the 
> queue. This would get ugly only if backend presumably in the middle of 
> some very long transaction, refused to pick up its messages despite 
> prodding. But ISTM that means we just need to pick a few strategic spots 
> that will call CHECK_FOR_NOTIFICATIONS() even in the middle of a 
> transaction and store them locally.

Why have the name on each message?  Presumably names are going to be few
compared to the total number of messages, so maybe store the names in a
separate hash table and link them with a numeric identifier.  That gives
you room for a lot more messages.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: notification payloads
Следующее
От: Weslee Bilodeau
Дата:
Сообщение: Partitioned tables constraint_exclusion