Re: Occasional timeouts on TRUNCATE and simple INSERTs

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Occasional timeouts on TRUNCATE and simple INSERTs
Дата
Msg-id CAHyXU0xyuwjCjn288hV9wXyF0-NY+CTnz3R6VVFGWZ5=Lovudg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Occasional timeouts on TRUNCATE and simple INSERTs  (Sergey Konoplev <gray.ru@gmail.com>)
Ответы Re: Occasional timeouts on TRUNCATE and simple INSERTs  ("Osborn, Jeff" <jeosborn@akamai.com>)
Список pgsql-performance
On Tue, Dec 11, 2012 at 3:38 PM, Sergey Konoplev <gray.ru@gmail.com> wrote:
> On Tue, Dec 11, 2012 at 1:19 PM, Osborn, Jeff <jeosborn@akamai.com> wrote:
>> I am seeing some strange performance on a new pg9.1 instance.  We are seeing occasional statement timeouts on some
TRUNCATEsand INSERTs.  In both cases, the statements are quite simple: 
>>    - TRUNCATE schema.table;
>>   -  INSERT  INTO schema.table VALUES  ($1,2,$2,'');
>>
>> Sometimes these will succeed.  Occasionally I see timeouts.  The statement_timeout is set to 60 seconds.  These
tablesare not particularly large; in the case of the insert, the table only has three rows. 
>
> A most common case is when backup (pg_dump*) is running TRUNCATE has
> to wait for it because it acquires an access exclusive lock on a table
> and all other queries including INSERT have to wait for the TRUNCATE.
> Check the backup case first.

Yeah: absolute first thing to check is if your statements are being
blocked -- you can get that via pg_stat_activity from another session.
 It's a completely different beast if that's the case.

merlin


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

Предыдущее
От: Sergey Konoplev
Дата:
Сообщение: Re: Occasional timeouts on TRUNCATE and simple INSERTs
Следующее
От: "Osborn, Jeff"
Дата:
Сообщение: Re: Occasional timeouts on TRUNCATE and simple INSERTs