Re: BUG #17231: ERROR: tuple concurrently updated
От | Tom Lane |
---|---|
Тема | Re: BUG #17231: ERROR: tuple concurrently updated |
Дата | |
Msg-id | 967138.1634322291@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #17231: ERROR: tuple concurrently updated (PG Bug reporting form <noreply@postgresql.org>) |
Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes: > [ this: ] > c.execute('REFRESH MATERIALIZED VIEW CONCURRENTLY ab') > [ concurrently with this: ] > c.execute('GRANT ALL ON ALL TABLES IN SCHEMA public TO web_admin') > [ results in "tuple concurrently updated" ] Yeah, that's not very surprising, because both commands need to update ab's pg_class row. We could only really prevent this by having GRANT take an exclusive lock on the object(s) it's altering the ACLs of. That cure would likely be worse than the disease, especially for variants like GRANT ON ALL TABLES, which'd need to ex-lock quite a lot of objects, probably causing deadlock failures. So I'm not sure that there's any good way to improve this. (There are, BTW, probably plenty of ways to cause this type of failure when you do concurrent DDL commands on a single object.) regards, tom lane
В списке pgsql-bugs по дате отправления: