From: | "Dietmar Maurer" <dietmar(at)maurer-it(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | autovacuum and locks |
Date: | 2007-10-18 14:06:50 |
Message-ID: | E88155B5BD67CE4D87A3F1F70950B96A1AFA6E@berta.maurer-it.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
recently our application was locked, and postgres shows several
processes in "LOCK TABLE waiting" state. Even the autovacuum process is
stalled.
The pg_locks table shows the following:
> SELECT pg_class.relname AS table, transaction, pid, mode, granted FROM
pg_locks, pg_class, pg_database WHERE pg_locks.relation = pg_class.oid
AND pg_locks.database = pg_database.oid;
pg_class 3389057 | 26130 | AccessShareLock
| t
pg_class_oid_index 3389057 | 26130 | AccessShareLock
| t
pg_locks 3389057 | 26130 | AccessShareLock
| t
cgreylist 3368984 | 10979 |
ShareUpdateExclusiveLock | t
cgreylist_pkey 3368984 | 10979 |
ShareUpdateExclusiveLock | t
cgreylist_extime_index 3368984 | 10979 |
ShareUpdateExclusiveLock | t
cgreylist_instance_sender_index 3368984 | 10979 |
ShareUpdateExclusiveLock | t
cgreylist_mtime_index 3368984 | 10979 |
ShareUpdateExclusiveLock | t
cgreylist 3368998 | 10980 | ExclusiveLock
| f
cgreylist 3369000 | 10984 | AccessShareLock
| t
cgreylist 3369000 | 10984 | RowExclusiveLock
| f # WHY?
cgreylist_extime_index 3369000 | 10984 | AccessShareLock
| t
cgreylist 3388458 | 10023 | ExclusiveLock
| f ?
cgreylist 3388420 | 10021 | ExclusiveLock
| f ?
Why cant postgres get the RowExclusiveLock in transaction 3369000?
I do not see any confliction lock types here - or do i miss something?
(we use postgresql-8.1 (8.1.8-1) on debian 4.0)
- Dietmar
From | Date | Subject | |
---|---|---|---|
Next Message | Lothar Behrens | 2007-10-18 14:40:54 | Am I overseen ? |
Previous Message | Stefan Schwarzer | 2007-10-18 13:24:17 | Crosstab Problems |