On Fri, Jun 26, 2009 at 1:34 AM, Janet Jacobsen<jsjacobsen@lbl.gov> wrote:
> Thank you for the answers. Very helpful.
>
> Between the time that I sent my original post and saw your reply,
> I tried to drop a couple of foreign key constraints. The alter
> table statements also showed up as "waiting" when I ran ps aux.
>
> I took your suggestion to run pg_locks and pg_stat_activity.
> pg_stat_activity showed that I had three statements that were
> waiting, and that there was one user whose query was given
> as "<insufficient privilege>". I killed the process associated
> with that user, and my three waiting statements executed
> immediately.
FYI, that means you, the user, don't have sufficient privileges to
view their query.