Search Postgresql Archives

autovacuum and locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux