I ran this command:
select pg_class.relname,pg_locks.* from pg_class,pg_locks where
and it appears that almost every table in my database has
""AccessShareLock". I have read that those locks are placed on tables for
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(at)gunduz(dot)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
In response to
pgsql-novice by date
|Next:||From: Tom Lane||Date: 2012-04-09 23:18:00|
|Subject: Re: Cannot DROP while process running |
|Previous:||From: Devrim GÜNDÜZ||Date: 2012-04-09 20:12:47|
|Subject: Re: Cannot DROP while process running|