Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Which (table) lock mode to use

Поиск
Список
Период
Сортировка
От Ben
Тема Which (table) lock mode to use
Дата
Msg-id 5f4a64610412141655640e56a6@mail.gmail.com
обсуждение исходный текст
Ответы Re: Which (table) lock mode to use
Список pgsql-general
Hi

I have this scenario and would like to use lock table for this but I
don't know which mode I should use.

When I delete/update/insert a record from/to a table, I need to update
some fields of all the records in this table. During this process I
don't want anyone to insert, update or delete the data but allow them
to select the data at the original state.

I am currently using:

LOCK TABLE tbl_name IN SHARE ROW EXCLUSIVE MODE

Is this the correct mode to use?

Thanks,
Ben

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