Search Postgresql Archives

Preventing or controlling runaway queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux