Re: check if the same function is already running, then exit! - Mailing list pgsql-general

From Andy Colson
Subject Re: check if the same function is already running, then exit!
Date
Msg-id 54C69DF3.1060305@squeakycode.net
Whole thread Raw
In response to check if the same function is already running, then exit!  (Suresh Raja <suresh.rajaabc@gmail.com>)
List pgsql-general
On 1/26/2015 1:58 PM, Suresh Raja wrote:
> Before running a running a function, i would check only 1 instance is
> running.  If alreaady a function is running, the existing function
> should exist with the msg that already a function with same is running.
>
> If somebody has already used such a faeture, can u please share or
> Can you tell me the table and column from which I could this info.
>
> Thanks,

Advisory locks might work for you:

http://www.postgresql.org/docs/9.4/static/explicit-locking.html
(at the bottom of the page)

google will find other's talking about it:  "postgres advisory lock"

-Andy



pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: How to access large objects in Postgresql c-language functions?
Next
From: amihay gonen
Date:
Subject: Re: Psql 9.4 with server 9.4 doesn't auto complete table names