Preventing or controlling runaway queries
От | Eric E |
---|---|
Тема | Preventing or controlling runaway queries |
Дата | |
Msg-id | 43948EC3.4030407@gmail.com обсуждение исходный текст |
Ответы |
Re: Preventing or controlling runaway queries
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: