Re: add column with default value is very slow

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: add column with default value is very slow
Дата
Msg-id 504F4588.7030900@dunslane.net
обсуждение исходный текст
Ответ на Re: add column with default value is very slow  (AI Rumman <rummandba@gmail.com>)
Список pgsql-performance
On 09/11/2012 09:55 AM, AI Rumman wrote:
> I added the excel file for locks data.
> I was surprised to see that while I was updating a single column value
> for all records in a tables, all indexes are locked by the server.


Any ALTER TABLE command locks the whole table in ACCESS EXCLUSIVE mode,
indexes included. See the description of ACCESS EXCLUSIVE lock at
<http://www.postgresql.org/docs/current/static/explicit-locking.html>

cheers

andrew




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

Предыдущее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: add column with default value is very slow
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Planner selects different execution plans depending on limit