Re: DROP VIEW lasts forever - Mailing list pgsql-general

From Chris Browne
Subject Re: DROP VIEW lasts forever
Date
Msg-id 60r6jtkc7t.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to DROP VIEW lasts forever  ("Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.de>)
List pgsql-general
Christian.Rengstl@klinik.uni-regensburg.de ("Christian Rengstl") writes:
> Whenever I try dropping a view using DROP VIEW myschema.myview the
> query runs forever. The last time I tried was ten minutes ago and the
> query is still running even though the view queries just data of one
> single table with around 5 fields.
> What could be the reason?
>
> By the way, I'm using psql 8.2

Chances are that the problem was that some connection had a lock on
the VIEW.

As a rule, when something "takes forever" when there is no reasonable
reason for it to be expected to run for a long time (e.g. - where
you're doing a cross join of two tables that each have a billion
tuples), it is entirely likely that you have run afoul of some locks,
and you can expect that NOTHING will happen until such time as
whatever is holding onto the locks lets go of them.
--
output = reverse("gro.mca" "@" "enworbbc")
http://cbbrowne.com/info/nonrdbms.html
"Unlike computers, guns don't have Y2K problems..."

pgsql-general by date:

Previous
From: Josh Trutwin
Date:
Subject: Re: Array intersection
Next
From: Sam Mason
Date:
Subject: Re: Array intersection