Information regarding Table-Locks

Поиск
Список
Период
Сортировка
От sri harsha
Тема Information regarding Table-Locks
Дата
Msg-id CAP6OGLF859fRjCfaO_Z6pKR2McMfsT_3U00+8bsie50pVjSEWg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Information regarding Table-Locks  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
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 which i am getting the data will also come under this lock ?? Or is it a separate lock ?? Does postgres handle that lock ??

What kind of lock will the second table will be in ?? Can i rename the second table while executing the INSERT QUERY ??

Thanks,
Harsha

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Casting hstore to json
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Information regarding Table-Locks