"Ron Mayer" <ron@intervideo.com> writes:
> Josh wrote:
>> You cannot cap CPU usage in *any* way unless you are using a "real time
>> operating system", like QNX or Real Time Linux, or some of the radical
>> patches for Linux kernel 2.5. And PostgreSQL has not been ported to any of
>> those systems AFAIK, so you're on your own ...
FWIW, we did have a working QNX port until recently. It's suffering bit
rot for lack of a maintainer (Andreas hasn't been seen for awhile :-()
but certainly it could be resurrected if someone wanted to put in some
effort.
> How about "man ulimit" whose man page hasn't changed since Linux 2.0?
> The csh command "limit cputime 1" will happily limit child processes
> to 1 second of CPU time, and any process exceeding this limit will
> die with a SIGXCPU.
Which the postmaster will (indeed must) take as a backend crash prompting
a database-wide restart. This is not gonna be a useful technique.
regards, tom lane