pgsql: Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by
В списке pgsql-committers по дате отправления:
| От | tgl@postgresql.org (Tom Lane) |
|---|---|
| Тема | pgsql: Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by |
| Дата | |
| Msg-id | 20080312201248.4874F753336@cvs.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
Log Message:
-----------
Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by postponing
pg_listener modifications commanded by LISTEN and UNLISTEN until the end
of the current transaction. This allows us to hold the ExclusiveLock on
pg_listener until after commit, with no greater risk of deadlock than there
was before. Aside from fixing the race condition, this gets rid of a
truly ugly kludge that was there before, namely having to ignore
HeapTupleBeingUpdated failures during NOTIFY. There is a small potential
incompatibility, which is that if a transaction issues LISTEN or UNLISTEN
and then looks into pg_listener before committing, it won't see any resulting
row insertion or deletion, where before it would have. It seems unlikely
that anyone would be depending on that, though.
Tags:
----
REL7_4_STABLE
Modified Files:
--------------
pgsql/src/backend/commands:
async.c (r1.102.2.2 -> r1.102.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/async.c?r1=1.102.2.2&r2=1.102.2.3)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера