Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Robert Haas writes: > On Tue, Dec 15, 2009 at 3:45 PM, Tom Lane 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 doable. > This may be a stupid quest

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 wrote: > Robert Haas 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 i

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Robert Haas 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, but it's certainly

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 wrote: > Robert Haas writes: >> On Tue, Dec 15, 2009 at 1:23 PM, Tom Lane wrote: >>> Alvaro Herrera 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

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Robert Haas writes: > On Tue, Dec 15, 2009 at 1:23 PM, Tom Lane wrote: >> Alvaro Herrera 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 tha

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 wrote: > Alvaro Herrera 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

Re: [BUGS] statement_timeout is not cancelling query

2009-12-15 Thread Tom Lane
Alvaro Herrera 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 an issue, you're screwed

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 wrote: > > On Tue, Dec 15, 2009 at 3:44 PM, Robert Haas 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 5:18 PM, Robert Haas 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 other reason than that

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 wrote: > On Tue, Dec 15, 2009 at 4:16 PM, Robert Haas 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 dis

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 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 of swap. There is

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 wrote: > On Tue, Dec 15, 2009 at 3:44 PM, Robert Haas 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

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 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 > gracefully with a

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 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 means your server is m

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 memory