BUG #7594: "tuple concurrently updated" error on concurrent GRANT ON DATABASE statements

Поиск
Список
Период
Сортировка
От max@suse.de
Тема BUG #7594: "tuple concurrently updated" error on concurrent GRANT ON DATABASE statements
Дата
Msg-id E1TLyjV-0008JC-OV@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7594
Logged by:          Reinhard Max
Email address:      max@suse.de
PostgreSQL version: 9.1.6
Operating system:   openSUSE
Description:        =


Is it intentional, that concurrent GRANT statements for the same database
may result in a "tuple concurrently updated" error?

It can be reproduced by running the following loop from two shells at the
same time:

while true; do psql -c "GRANT ALL ON DATABASE foo TO foo" ; done

I found that wrapping the GRANT statement in a transaction and explicitly
locking pg_table in SHARE UPDATE EXCLUSIVE mode makes the error disappear.
According to the documentation of the lock modes, statements like VACUUM
acquire this lock by itself, so I wonder if GRANT ON DATABASE should do the
same.

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #7534: walreceiver takes long time to detect n/w breakdown
Следующее
От: demurcia@ockham-solutions.fr
Дата:
Сообщение: BUG #7593: Unexpected query result combining or and in operators