From: | "Yelai, Ramkumar IN BLR STS" <ramkumar(dot)yelai(at)siemens(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Moshe Jacobson <moshe(at)neadwerx(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Parallel Insert and Delete operation |
Date: | 2012-11-07 05:58:10 |
Message-ID: | 13D0F6C9B3073A4999E61CAAD61AE7ECC5E84B1704@INBLRK77M2MSX.in002.siemens.net |
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
Thanks very much Albe.
I am not aware of that, delete will lock the table.
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2012-11-07 06:01:38 | Re: creating a function returning FALSE on NULL input ? |
Previous Message | Yvon Thoraval | 2012-11-07 05:33:15 | creating a function returning FALSE on NULL input ? |