plpython infinite loop

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: plpython infinite loop
Date: 2009-01-27 10:52:35
Message-ID: glmp1k$rjm$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm using posgresql 8.2.4 on Gentoo Linux.

Is there anything that can be done about an infinite loop in plpython?
I tired stopping the query (with PG Admin), but the process kept going
on the server. I tried pg_cancel_backend but it kept running. I tried
kill -INT and it ignored that as well.

I found a response by Tom Lane from Oct. 3 2007, subject: Re: [GENERAL]
pg_cancel_backend() does not work with buzz queries

where he suggested the solution: "Short answer: don't write infinite
loops in plpython"

The query was a simple loop that was programmed by accident. It is using
100% of CPU. Is there a better way then restarting the server?
Is this fixed in a more current version?

Thanks
Sim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl+53MACgkQjDX6szCBa+owmQCfWxyVBZdnMW3zSUqbatl83wrD
3vcAoJLrYJE8cjCkcWTJEgmkxL7U33sO
=qHrx
-----END PGP SIGNATURE-----

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Wenk 2009-01-27 11:02:18 Re: Text search with ispell
Previous Message Thom Brown 2009-01-27 10:50:43 Re: Varchar vs text