Re: SSI slows down over time

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: SSI slows down over time
Дата
Msg-id 1397490843.97407.YahooMailBasic@web122304.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на Re: SSI slows down over time  (Ryan Johnson <ryan.johnson@cs.utoronto.ca>)
Список pgsql-performance
Ryan Johnson <ryan.johnson@cs.utoronto.ca> wrote:

> what factors might cause a prepared transaction to exist in the
> first place?

As part of a "distributed transaction" using "two phase commit" a
PREPARE TRANSACTION statement would have had to run against
PostgreSQL:

http://www.postgresql.org/docs/current/interactive/sql-prepare-transaction.html

> I'm running a single-node db, and I've had only normal database
> shutdowns, so I wouldn't have expected any.

Prepared transactions survive shutdowns, normal or not, so that
doesn't matter; but prepared transactions are normally used with a
transaction manager coordinating transactions among multiple data
stores.  On the other hand, I have seen cases where a developer
"playing around" with database features has created one.  And using
them with a "home-grown" transaction manager rather than a mature
product is risky; there are some non-obvious pitfalls to avoid.

Anyway, you may have found a bug, but most of what you're seeing
could be caused by a prepared transaction sitting around
indefinitely, so it's something to check before looking at other
possible causes.  If you have a way to reproduce this from a new
cluster, please share it.  That always makes diagnosis much easier.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Craig James
Дата:
Сообщение: Re: Getting query plan alternatives from query planner?
Следующее
От: Robert DiFalco
Дата:
Сообщение: Approach to Data Summary and Analysis