Re: Cannot DROP while process running

Поиск
Список
Период
Сортировка
От Steve Horn
Тема Re: Cannot DROP while process running
Дата
Msg-id CAFLkBaUbJb=-BJ2Sw9h2A_nJTirXe9Bmz9ku3RHVbtshH6+Wsg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Cannot DROP while process running  (Devrim GÜNDÜZ <devrim@gunduz.org>)
Ответы Re: Cannot DROP while process running  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
I ran this command:
select pg_class.relname,pg_locks.* from pg_class,pg_locks where pg_class.relfilenode=pg_locks.relation; 

and it appears that almost every table in my database has ""AccessShareLock". I have read that those locks are placed on tables for SELECT access. 

There should be no queries actively accessing the other tables in that database (this database is in development only). A second question would be, can I clear those locks?

2012/4/9 Devrim GÜNDÜZ <devrim@gunduz.org>
On Mon, 2012-04-09 at 16:08 -0400, Tom Lane wrote:
> > When I issue the drop command for a table, the server doesn't
> respond - not
> > even with increased disk activity or CPU usage. I am wondering if a
> lock is
> > blocking it?
>
> Look into pg_locks to find out.

We probably need a better view which joins pg_stat_activity and
pg_locks, along with the new pg_stat_activity column in 9.2, which will
give users better idea about what is locking what...
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz



--
Steve Horn

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

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: Cannot DROP while process running
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Cannot DROP while process running