Re: Postgres Hanging on Inserts

Поиск
Список
Период
Сортировка
От Alvaro Herrera Munoz
Тема Re: Postgres Hanging on Inserts
Дата
Msg-id 20030730181943.GD24539@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Postgres Hanging on Inserts  ("Adam Kavan" <akavan@cox.net>)
Ответы Re: Postgres Hanging on Inserts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Wed, Jul 30, 2003 at 01:03:55PM -0500, Adam Kavan wrote:

> I have found the problem (I think) below is the list of all the locks
> pending on the relation.  The relation is a hash index on the table that is
> being INSERT'd rapidly.  From what I can see pid 10024 and 10025 both have
> an ExclusiveLock on the index, and they both are waiting to get an
> ExclusiveLock on the relation.

Oh, so this is the problem.  Truth is hash indexes in Postgres are known to
have poor concurrency, though I didn't expect them to be subject to
deadlocks...  you should change the hash index to a btree index and the
problem will "go away"; you will also probably see a performance improvement
if there's concurrent insertion and access.  BTrees are way more developed
than hashes.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"The ability to monopolize a planet is insignificant
next to the power of the source"

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

Предыдущее
От: DeJuan Jackson
Дата:
Сообщение: Re: Minimal system (was Re: Basic questions before start)
Следующее
От: Dennis Gearon
Дата:
Сообщение: Re: Diff between contrib/dbmirror and rserv