Re: statement_timeout is not cancelling query

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>, Mark Williamson <thetazzbot(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: statement_timeout is not cancelling query
Date: 2009-12-15 17:37:46
Message-ID: 407d949e0912150937v5e116426v23c00e7b52acd44b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Dec 15, 2009 at 5:18 PM, Robert Haas <robertmhaas(at)gmail(dot)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 other reason than that the operating system
> configurator usually recommends creating one.

Well I suppose it's a question of degree. The more swap you have the
more you can do before you run out of memory. But nobody said swap
performs as well as RAM.... What's the kernel going to do though,
refuse to allocate memory when it has swap available?

The problem is that the OS gives no feedback on when you're running
low on RAM but haven't run out yet. There were experiments in the 90s
with a SIGDANGER but I think it never worked great and I don't think
it's widespread.

If Postgres imposed a limit itself it would a) be hard for it to be a
server-wide limit and b) wouldn't take into account other things
running on the system. So that doesn't really help either.

--
greg

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2009-12-15 17:59:59 Re: statement_timeout is not cancelling query
Previous Message Magnus Hagander 2009-12-15 17:22:49 Re: BUG #5242: ODBC driver v8.4.1 crashed