Re: High CPU load on Postgres Server during Peak times!!!!

Поиск
Список
Период
Сортировка
От Craig James
Тема Re: High CPU load on Postgres Server during Peak times!!!!
Дата
Msg-id 4ABBBE48.1020104@emolecules.com
обсуждение исходный текст
Ответ на Re: High CPU load on Postgres Server during Peak times!!!!  ("Dave Dutcher" <dave@tridecap.com>)
Ответы Re: High CPU load on Postgres Server during Peak times!!!!
Список pgsql-performance
Dave Dutcher wrote:
> You need a COMMIT for every BEGIN.  If you just run a SELECT statement
> without first beginning a transaction, then you should not end up with a
> connection that is Idle in Transaction.  If you are beginning a transaction,
> doing a select, and then not committing, then yes that is a bug.

The BEGIN can be hidden, though.  For example, if the application is written in Perl,

  $dbh = DBI->connect($dsn, $user, $pass, {AutoCommit => 0});

will automatically start a transaction the first time you do anything.  Under the covers, the Perl DBI issues the BEGIN
foryou, and you have to do an explicit 

  $dbh->commit();

to commit it.

Craig



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

Предыдущее
От: Karl Denninger
Дата:
Сообщение: Re: High CPU load on Postgres Server during Peak times!!!!
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Regarding Sequential Scans count increase each time we press refresh .