pgsql: Improve LISTEN startup time when there are many unread notificat
В списке pgsql-committers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | pgsql: Improve LISTEN startup time when there are many unread notificat |
| Дата | |
| Msg-id | E1ZhUcB-000655-75@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Improve LISTEN startup time when there are many unread notifications. If some existing listener is far behind, incoming new listener sessions would start from that session's read pointer and then need to advance over many already-committed notification messages, which they have no interest in. This was expensive in itself and also thrashed the pg_notify SLRU buffers a lot more than necessary. We can improve matters considerably in typical scenarios, without much added cost, by starting from the furthest-ahead read pointer, not the furthest-behind one. We do have to consider only sessions in our own database when doing this, which requires an extra field in the data structure, but that's a pretty small cost. Back-patch to 9.0 where the current LISTEN/NOTIFY logic was introduced. Matt Newell, slightly adjusted by me Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/aad86c518d7b3b97c14872258c02551b443536f0 Modified Files -------------- src/backend/commands/async.c | 50 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 5 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера