Re: Parallel Insert and Delete operation

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Parallel Insert and Delete operation
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C208A4E67C@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Parallel Insert and Delete operation  ("Yelai, Ramkumar IN BLR STS" <ramkumar.yelai@siemens.com>)
Ответы Re: Parallel Insert and Delete operation  ("Yelai, Ramkumar IN BLR STS" <ramkumar.yelai@siemens.com>)
Список pgsql-general
Ramkumar Yelai wrote:
[is worried that a database might become inconsistent if conflicting
INSERTs and DELETEs occur]
> @Albe  - I  got you first point. The second point is little skeptical
because postgres could have been
> avoided this lock by using MVCC. Please correct me if I am wrong?

Which lock could have been avoided?

PostgreSQL locks rows when the data change.
That has little to do with MVCC.

If you INSERT into a table that has a foreign key, the
referenced row in the referenced table gets a SHARE lock
that conflicts with the EXCLUSIVE lock required for
a DELETE.
So they cannot execute concurrently.

Yours,
Laurenz Albe


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

Предыдущее
От: Frank Broniewski
Дата:
Сообщение: Memory issue on FreeBSD
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Corrupt Incrementally Updated Backup: missing pg_clog file