Thread: DROP VIEW lasts forever

DROP VIEW lasts forever

From
"Christian Rengstl"
Date:
Hi list,

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

Thanks in advance



Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230




Re: DROP VIEW lasts forever

From
"Christian Rengstl"
Date:
Nevermind, by mistake I tried dropping it as a different user. But, just
a question, wouldn't it make more sense to issue an error message or
something instead of letting the query run indefinitely?



Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230




Re: DROP VIEW lasts forever

From
"A. Kretschmer"
Date:
am  Wed, dem 17.10.2007, um 13:01:25 +0200 mailte Christian Rengstl folgendes:
> Hi list,
>
> 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?

maybe a look because an other transaction?


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

Re: DROP VIEW lasts forever

From
Chris Browne
Date:
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..."