Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DE747FDFFE3 for ; Tue, 29 May 2012 07:02:05 -0300 (ADT) Received: from mx4.wp.pl ([212.77.101.8]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SZJFa-0002Fa-Mk for pgsql-sql@postgresql.org; Tue, 29 May 2012 10:02:04 +0000 Received: (wp-smtpd smtp.wp.pl 29120 invoked from network); 29 May 2012 12:01:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1338285709; bh=sYStfKDEL8mraFIiVk1+vhLgA7fQdEBeRQ4M6B7ypzU=; h=From:To:CC:Subject; b=bGN65hXNRcqHq22VosvWTzxMjwz4ziKN/SIBcST8APORl4vo5hYq6jT4G9tnAa7Vo y3axjG6cQWXQkBRJd20eBykZq4te1CeocOis3grUvFd+LDTHZcM0g5fudrk66v3NRX ACZx+4Sl2laxaByGgzM4lACHuhht3A6hXqFGmNBk= Received: from 82-210-167-137.home.aster.pl (HELO [192.168.1.144]) (ipluta@[82.210.167.137]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with AES256-SHA encrypted SMTP for ; 29 May 2012 12:01:49 +0200 Message-ID: <4FC49E8B.6040006@wp.pl> Date: Tue, 29 May 2012 12:01:47 +0200 From: Ireneusz Pluta User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Jan Lentfer CC: pgsql-sql@postgresql.org Subject: Re: Job control in sql References: <4FBF4293.4090902@krap.dk> <879f6ef6940b25a63a82d87dc0c530c3@neslonek.homeunix.org> In-Reply-To: <879f6ef6940b25a63a82d87dc0c530c3@neslonek.homeunix.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [sbI9] X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201205/99 X-Sequence-Number: 36647 W dniu 2012-05-25 14:52, Jan Lentfer pisze: > Add a sort of status table where you insert your unique job identifer at the start of the function > and remove it in the end? As seperate transactions of course. That might leave status set on forever in a case when a job crashes and does not reach the point where it removes the identifier.