Re: ERROR: tuple concurrently updated

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ERROR: tuple concurrently updated
Дата
Msg-id 4840.1175104939@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ERROR: tuple concurrently updated  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Ответы Re: ERROR: tuple concurrently updated  ("Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com>)
Список pgsql-bugs
"Zubkovsky, Sergey" <Sergey.Zubkovsky@transas.com> writes:
> create table t1 ( id int );
> create temp view v1 as select * from t1;
> C1: begin; drop view v1;
> C2: drop table t1;
> C1: commit;

This seems a variant of the problem noted by Michael Fuhr some time ago:
http://archives.postgresql.org/pgsql-hackers/2007-01/msg00937.php

but I think it shows that the solution I proposed in that thread is
still not adequate.  To deal with the above, it seems like dropping v1
would have to acquire a shared lock on t1, thereby preventing the drop
of t1 from starting until after v1 is safely gone.  Or maybe have the
drop of t1 recheck to see if v1 is still there after it has acquired
lock on v1, but I'm afraid that might be too late to prevent an update
conflict on the pg_depend row that both transactions want to delete.
Ick.

            regards, tom lane

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

Предыдущее
От: "Zubkovsky, Sergey"
Дата:
Сообщение: ERROR: tuple concurrently updated
Следующее
От: Martin Pitt
Дата:
Сообщение: postmaster 8.2 eternally hangs in sempaphore lock acquiring