Skip site navigation (1) Skip section navigation (2)

Re: Cannot DROP while process running

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Horn <steve(at)stevehorn(dot)cc>
Cc: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Cannot DROP while process running
Date: 2012-04-10 13:57:26
Message-ID: 29029.1334066246@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Steve Horn <steve(at)stevehorn(dot)cc> writes:
> Here is the result of this select:
> select datname, procpid, current_query from pg_stat_activity;

> As you can see, there appears to be no connection to the other tables with
> the AccessShareLocks.

Well, it's hard to tell what other locks those transactions have already
got.  You really ought to be looking in pg_locks not just 
pg_stat_activity.

BTW, another thing that occasionally trips people up is unintended use
of a prepared transaction (that they then forget to commit or roll back).
Does the pg_prepared_xacts view show anything?

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Steve HornDate: 2012-04-11 19:19:54
Subject: Re: Cannot DROP while process running
Previous:From: Steve HornDate: 2012-04-10 12:58:10
Subject: Re: Cannot DROP while process running

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group