'tuple concurrently updated' error for alter role ... set
Вложения
В списке pgsql-hackers по дате отправления:
| От | Alexey Klyukin |
|---|---|
| Тема | 'tuple concurrently updated' error for alter role ... set |
| Дата | |
| Msg-id | 645346BD-753F-4EEA-94C8-61A0A52F59A0@commandprompt.com обсуждение |
| Ответы |
Re: 'tuple concurrently updated' error for alter role ... set
|
| Список | pgsql-hackers |
Hello, We have recently observed a problem with concurrent execution of ALTER ROLE SET... in several sessions. It's similar to theone from http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=fbcf4b92aa64d4577bcf25925b055316b978744a Theresult is the 'tuple concurrently updated' error message, and the problem is easily reproducible: CREATE SCHEMA test; CREATE SCHEMA test2; CREATE ROLE testrole; session 1: while [ 1 ]; do psql postgres -c 'alter role testrole set search_path=test2';done session 2: while [ 1 ]; do psql postgres -c 'alter role testrole set search_path=test';done The error message appears almost immediately on my system. After digging in the code I've found that a RowExclusiveLock is acquired on a pg_db_role_setting table in AlterSetting().While the name of the locks suggests that it should conflict with itself, it doesn't. After I've replacedthe lock in question with ShareUpdateExclusiveLock, the problem disappeared. Attached is the simple patch with thesechanges. Regards, -- Alexey Klyukin The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера