From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "Yelai, Ramkumar IN BLR STS *EXTERN*" <ramkumar(dot)yelai(at)siemens(dot)com>, "Moshe Jacobson" <moshe(at)neadwerx(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Parallel Insert and Delete operation |
Date: | 2012-11-05 10:30:18 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C208A4E67C@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2012-11-05 10:36:25 | Re: Corrupt Incrementally Updated Backup: missing pg_clog file |
Previous Message | Frank Broniewski | 2012-11-05 10:22:46 | Memory issue on FreeBSD |