Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZtGJ-0001cr-AG for pgsql-sql@postgresql.org; Sun, 18 Nov 2012 01:01:27 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TZtGD-0000G8-PD for pgsql-sql@postgresql.org; Sun, 18 Nov 2012 01:01:26 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TZtGJ-00081I-2k for pgsql-sql@postgresql.org; Sun, 18 Nov 2012 02:01:27 +0100 Received: from ip-118-90-18-9.xdsl.xnet.co.nz ([118.90.18.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Nov 2012 02:01:27 +0100 Received: from jasen by ip-118-90-18-9.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 Nov 2012 02:01:27 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Jasen Betts Subject: Re: organizing cron jobs in one function Date: 18 Nov 2012 00:50:34 GMT Organization: Dis (not Dat) Organisation Lines: 16 Message-ID: References: <20121117161916.GA9492@apartia.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip-118-90-18-9.xdsl.xnet.co.nz X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201211/19 X-Sequence-Number: 36952 On 2012-11-17, Louis-David Mitterrand wrote: > Hi, > > I'm planning to centralize all db maintenance jobs from a single > pl/pgsql function called by cron every 15 minutes (highest frequency > required by a list of jobs). In pseudo code: centralising execution of cron jobs into a single function is a recipe for locking problems, if your jobs are not of the type that acquire exclusive locks on tables, it might work for you. . -- ⚂⚃ 100% natural