From: Eric E <whalesuit@gmail.com>
To: pgsql-general@postgresql.org
Subject: Preventing or controlling runaway queries
Date: Mon, 05 Dec 2005 14:02:27 -0500
Message-ID: <43948EC3.4030407@gmail.com> (raw)
Hi all,
I've recently had a couple worrisome experiences with runaway
queries in postgres 7.4 and 8.0, and I'm wondering what I can do to
control or prevent these. When I ran a query against a large table, I
accidentally omitted mistyped a table name, and a table was
automatically added, resulting in a massive result set that crash my
postmaster instance. I know that the automatic addition of missing
tables to queries can be disabled, so I'm not so worried about that.
However, I am worried about generic queries being able to crash the
entire server instance, which in my case occurs because the query
process keeps allocating more memory until the machine is out of memory,
then Linux' memory manager kills the process (I learned this latter part
thanks to the list archives). Is there some way to limit the amount of
memory a single query process can use? If it reaches that limit, what
happens to the query? What I'm looking for is a way to have the query
be ended or suspended without the OS (Linux) killing the server
process). Does anyone had suggestions on how to accomplish this?
Thanks,
Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: whalesuit@gmail.com, pgsql-general@postgresql.org
Subject: Re: Preventing or controlling runaway queries
In-Reply-To: <43948EC3.4030407@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox