Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Robert Haas
On Tue, Dec 15, 2009 at 12:09 AM, Craig Ringer cr...@postnewspapers.com.au wrote: On 15/12/2009 12:35 PM, Mark Williamson wrote: So what happened is, the above update never completed and the Postgresql service consumed all available memory.  We had to forcefully reboot the machine That

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Greg Stark
On Tue, Dec 15, 2009 at 3:44 PM, Robert Haas robertmh...@gmail.com wrote:  This is an issue that other people have run into in the past, and I don't think we have a good solution.  I wonder if we should put some kind of a limit in place so that queries like this will at least fail relatively

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Robert Haas
On Tue, Dec 15, 2009 at 11:02 AM, Greg Stark gsst...@mit.edu wrote: On Tue, Dec 15, 2009 at 3:44 PM, Robert Haas robertmh...@gmail.com wrote:  This is an issue that other people have run into in the past, and I don't think we have a good solution.  I wonder if we should put some kind of a

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Greg Stark
On Tue, Dec 15, 2009 at 4:16 PM, Robert Haas robertmh...@gmail.com wrote: I didn't know that, but it I think by the time malloc returns 0 usually other bad things are happening.  I don't think that's really an answer. Only if, as Craig said and you disputed, you have overcommit enabled or lots

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Robert Haas
On Tue, Dec 15, 2009 at 12:07 PM, Greg Stark gsst...@mit.edu wrote: On Tue, Dec 15, 2009 at 4:16 PM, Robert Haas robertmh...@gmail.com wrote: I didn't know that, but it I think by the time malloc returns 0 usually other bad things are happening.  I don't think that's really an answer. Only

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Greg Stark
On Tue, Dec 15, 2009 at 5:18 PM, Robert Haas robertmh...@gmail.com wrote: I suppose that I could fix this by getting rid of my swap partition altogether, but that seems a rather extreme solution, and it's certainly not the way most UNIX/Linux systems I run across are configured, if for no

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Alvaro Herrera
Robert Haas escribió: On Tue, Dec 15, 2009 at 11:02 AM, Greg Stark gsst...@mit.edu wrote: On Tue, Dec 15, 2009 at 3:44 PM, Robert Haas robertmh...@gmail.com wrote:  This is an issue that other people have run into in the past, and I don't think we have a good solution.  I wonder if we

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: If we're to do anything about this, it is spilling the trigger queue so it doesn't eat an unbounded amount of memory. Of course, the reason nothing much has been done about that is that by the time your trigger queue is long enough to cause such

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Robert Haas
On Tue, Dec 15, 2009 at 1:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: If we're to do anything about this, it is spilling the trigger queue so it doesn't eat an unbounded amount of memory. Of course, the reason nothing much has been done about

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Robert Haas
On Tue, Dec 15, 2009 at 1:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Dec 15, 2009 at 1:23 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@commandprompt.com writes: If we're to do anything about this, it is spilling the trigger

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Err, sorry, I quoted the wrong part. I meant, how would you rlimit the server memory usage? Put a ulimit command in the server start script? Depending on the details of the start script you might need to put it in the postgres user's .profile instead,

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Robert Haas
On Tue, Dec 15, 2009 at 3:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Err, sorry, I quoted the wrong part.  I meant, how would you rlimit the server memory usage? Put a ulimit command in the server start script?  Depending on the details of the start

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Dec 15, 2009 at 3:45 PM, Tom Lane t...@sss.pgh.pa.us wrote: Put a ulimit command in the server start script?  Depending on the details of the start script you might need to put it in the postgres user's .profile instead, but it's certainly

[BUGS] statement_timeout is not cancelling query

2009-12-14 Thread Mark Williamson
I have a few things to report so I'm not sure if one email is good or several but here goes. We are using Postgresql 8.3.8 We were having a blocking query problem that should have been fixed by statement_timeout = 9 however this seems to have had zero effect. The query we have was like so:

Re: [BUGS] statement_timeout is not cancelling query

2009-12-14 Thread Craig Ringer
On 15/12/2009 12:35 PM, Mark Williamson wrote: So what happened is, the above update never completed and the Postgresql service consumed all available memory. We had to forcefully reboot the machine That means your server is misconfigured. PostgreSQL should never consume all available