Search Postgresql Archives

Re: Is there a way to limit CPU usage per user

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

 



 

> -----Original Message-----
> From: pgsql-general-owner@xxxxxxxxxxxxxx 
> [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Tony Wasson
> Sent: 10 February 2006 15:31
> To: Michael Fuhr
> Cc: Luki Rustianto; Merlin Moncure; pgsql-general@xxxxxxxxxxxxxx
> Subject: Re: [GENERAL] Is there a way to limit CPU usage per user
> 
> I may get flamed for this, but this is how I have killed errant
> processes.   I suspect you should pause for a long time before try to
> install plperlu.
> 
> CREATE FUNCTION kill_pid(INTEGER) RETURNS TEXT AS
> $BODY$
>   my ($pid) = @_;
>   my $out=system("kill -TERM $pid");
>   return $out;
> $BODY$ language plperlu;
> 
> REVOKE ALL ON FUNCTION kill_pid(INTEGER) FROM public;

Why not use pg_cancel_backend(pid) - (aside from it sending a SIGINT
rather than TERM)?

Regards, Dave.


[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