Search Postgresql Archives

Re: Insert waiting for update?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





--- On Wed, 9/1/08, Ashish Karalkar <ashish_postgre@xxxxxxxxxxx> wrote:
From: Ashish Karalkar <ashish_postgre@xxxxxxxxxxx>
Subject: Insert waiting for update?
To: "pggeneral" <pgsql-general@xxxxxxxxxxxxxx>
Cc: ashish.karalkar@xxxxxxxxxxxxx
Date: Wednesday, 9 January, 2008, 4:29 PM

Dear list members,
I am having table with 4M rows.
I am trying to update all these rows with statement

update mytable set mycolumn=0;

At the same time there are insert happening on the table.
but all these insert are in waiting mode.
does update is locking the table for insert?

does insert and update confilict with each other?
With regards
Ashihsh


For more details:

I have two tables master,child.
with child having fk to master.

Now that master table contains 4M rows . while I update them (Master table) the inserts are going into waiting mode on child table.


Update  acquired row exclusive lock on master table  , and the insert on child table acquired access share and share lock,row share on master.

Is this is what preventing for inserting records into child table, I mean is the row exclusive lock conflicting with the locks insert wants to hold?



With Regards
Ashish...










Save all your chat conversations. Find them online.


Why delete messages? Unlimited storage is just a click away.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux