Re: [GENERAL] Information regarding Table-Locks

2015-01-15 Thread Guillaume Lelarge
Le 16 janv. 2015 06:27, "sri harsha" a écrit : > > Hi John. > >What if my query was INSERT INTO Postgres_Table_A SELECT * FROM Postgres_Table_B ?? What are the locks given for the two tables ?? > If they are both regular tables, they can insert at the same time. But you can't rename a take wh

Re: [GENERAL] Information regarding Table-Locks

2015-01-15 Thread sri harsha
Hi John. What if my query was INSERT INTO Postgres_Table_A SELECT * FROM Postgres_Table_B ?? What are the locks given for the two tables ?? --Harsha On Fri, Jan 16, 2015 at 10:50 AM, John R Pierce wrote: > On 1/15/2015 9:14 PM, sri harsha wrote: > >> What kind of lock will the second table

Re: [GENERAL] Information regarding Table-Locks

2015-01-15 Thread John R Pierce
On 1/15/2015 9:14 PM, sri harsha wrote: What kind of lock will the second table will be in ? I suspect that depends on what FOREIGN_TABLE is connected to. -- john r pierce 37N 122W somewhere on the middle of the left coast -- Sent via pgsql-general mai

[GENERAL] Information regarding Table-Locks

2015-01-15 Thread sri harsha
Hi, I have a few doubts regarding table locks. Assume I am executing the following query Query 1 -- INSERT INTO FOREIGN_TABLE SELECT * FROM POSTGRES_TABLE Query 2 -- INSERT INTO FOREIGN_TABLE SELECT * FROM FOREIGN_TABLE If i get a table lock for the foreign table , will the second table from