Re: lock contention, need profiling idea

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: lock contention, need profiling idea
Дата
Msg-id CAB7nPqTPGz_i0RDdao1EiJX03kyTNvHR_fcJAwuBSCRqwJTuvA@mail.gmail.com
обсуждение исходный текст
Ответ на lock contention, need profiling idea  (AI Rumman <rummandba@gmail.com>)
Ответы Re: lock contention, need profiling idea  (AI Rumman <rummandba@gmail.com>)
Re: lock contention, need profiling idea  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general



On Tue, Jul 1, 2014 at 7:36 AM, AI Rumman <rummandba@gmail.com> wrote:
I see lots of similar log message at a certain time in a day on Postgresql 9,.1:

LOG:  process 18855 still waiting for ShareLock on transaction 2856146023 after 1001.209 ms
STATEMENT:  UPDATE table1 SET time = $1 WHERE id = $2

The table1 size is 17 G. 

What could be the reason for this lock contention?
autovacuum?
This may be a CREATE INDEX query taking some time, perhaps combined with an old prepared transaction still holding a lock? Perhaps a cron job running behind that you are not aware of?
You should have a look at pg_stat_activity, pg_prepared_xacts and pg_locks to get more information about the transactions running and the locks being taken.
--
Michael

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

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: how to create multiple databases running in different dirs
Следующее
От: Toby Corkindale
Дата:
Сообщение: pl/perl and recent perl versions - failing to load internal modules