Re: Re: sudden spurt in swap utilization (was:cpu bound postgresql setup.)
Вложения
В списке pgsql-performance по дате отправления:
| От | Tom Molesworth |
|---|---|
| Тема | Re: Re: sudden spurt in swap utilization (was:cpu bound postgresql setup.) |
| Дата | |
| Msg-id | 4C250F2C.2070709@audioboundary.com обсуждение исходный текст |
| Ответ на | Re: sudden spurt in swap utilization (was:cpu bound postgresql setup.) (Rajesh Kumar Mallah <mallah.rajesh@gmail.com>) |
| Список | pgsql-performance |
On 25/06/10 20:00, Rajesh Kumar Mallah wrote: > Dear tom, we have autocommit off in dbi. Any commit or rollback from > the persistent modperl process immediately issues begin work; if the > modperl process is waiting for request the database backend remains in > idle in transaction state. Unless we modify data in a http request we > neighter issue a commit nor rollback. > The backend shouldn't go to 'idle in transaction' state until there is some activity within the transaction. I've attached an example script to demonstrate this - note that even SELECT queries will leave the handle as 'IDLE in transaction' unless you've changed the transaction isolation level from the default. Any queries that are idle in transaction will block connection pooling and cause old versions of table rows to hang around, as described in other replies. Note that this is nothing to do with mod_perl, it's purely due to the way transactions are handled - a one-off script would also have this issue, but on exit issues an implicit rollback and disconnects. Typically your database wrapper would handle this (I think DBIx::Class should take care of this automatically, although I haven't used it myself). Tom
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера