Re: Exclusive Locks Taken on User Tables?
| От | Tom Lane |
|---|---|
| Тема | Re: Exclusive Locks Taken on User Tables? |
| Дата | |
| Msg-id | 28413.1194379307@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Exclusive Locks Taken on User Tables? (Marc <pgsql-general@mbreslow.net>) |
| Ответы |
Re: Exclusive Locks Taken on User Tables?
|
| Список | pgsql-general |
Marc <pgsql-general@mbreslow.net> writes:
> This is the query that I'm running to view locks:
> SELECT pg_class.relname AS table,
> pg_database.datname AS database,
> 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
> ORDER BY pg_class.relname, mode
> I'm pretty sure this filters out transactionid lock types because I'm
> joining to pg_database and pg_class. Pls correct me if I'm wrong though.
It won't filter out row-level locks on rows within tables. You're
probably looking at a transient row lock taken by a blocked SELECT FOR
UPDATE. You didn't show exactly what the real problem was, but I'm
wondering if this is foreign-key conflicts in a pre-8.1 PG version.
regards, tom lane
В списке pgsql-general по дате отправления: