Postgresql – ny option to kill the particular process automatically if it is consuming a particular value of cpu

postgresql

some sort of sql process makes my database server to consume 100% of the cpu, Is there any option to kill the particular process automatically if it is consuming a particular value of cpu ?

Best Answer

No, there isn't. But you could consider setting statement_timeout, which will kill any query running longer than a certain time.