Re: vacuum deadlock

Поиск
Список
Период
Сортировка
От Ibrahim Harrani
Тема Re: vacuum deadlock
Дата
Msg-id 530068a1002051014r65c160aej81d267cf30cb600e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: vacuum deadlock  (Yeb Havinga <yebhavinga@gmail.com>)
Ответы Re: vacuum deadlock
Список pgsql-admin
Hi Yeb,

Thanks for your reply.
As far as I know, pg_class_oid_index and pg_class are postgresql internal relations.

Normally, there is not application that directly using those relations.
How should I map this lock issue on this relations to my application side?
On which cases those are locked and used by applications?


Thanks

On Fri, Feb 5, 2010 at 2:36 PM, Yeb Havinga <yebhavinga@gmail.com> wrote:
Ibrahim Harrani wrote:
Hi,

I am using PostgreSQL 8.3.7.
autovacuum is enabled in postgresql.conf

I got  a deadlock while vacuuming all databases with vacuumdb command.

vacuumdb: vacuuming of database "mydb" failed: ERROR:  deadlock detected
DETAIL:  Process 1294 waits for AccessExclusiveLock on relation 2662 of database     ; blocked by process 1807.
Process 1807 waits for AccessShareLock on relation 1259 of database 16389; blocked by process 1294.

I think, because of this lock, deleting a large table (15 million records) was taking too much time
How can I know the name of the relations 2662 and 1259?
postgres=# select oid,relname from pg_class where oid in (2662,1259);
oid  |      relname      ------+--------------------
2662 | pg_class_oid_index
1259 | pg_class
(2 rows)

Do you have any ide about the problem and solution?
It would be interesting to know what are the processes 1807 and 1294. Once that is known, try to avoid executing both processes concurrently.

regards
Yeb Havinga


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

Предыдущее
От: Yeb Havinga
Дата:
Сообщение: Re: vacuum deadlock
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: vacuum deadlock