From: Markus Schaber <schabi@logix-tt.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Cc: weigelt@metux.de
Subject: Re: Mutex via database
Date: Wed, 04 May 2005 13:38:30 +0200
Message-ID: <4278B436.6050102@logix-tt.com> (raw)
In-Reply-To: <20050504112846.GA8968@nibiru.borg.metux.de>
References: <20050504112846.GA8968@nibiru.borg.metux.de>
Hi, Enrico,
Enrico Weigelt wrote:
> i've a dozen of servers processing jobs from a database.
> Some servers may only run exactly once, otherwise I'll get jobs
> done twice.
>
> Is there any way for implementing an kind of mutex within the
> database, which is automatically released if the holding
> process/connection dies ?
Use the "LOCK" sql command, possibly together with transaction isolation
set to serializable.
Markus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: schabi@logix-tt.com, weigelt@metux.de
Subject: Re: Mutex via database
In-Reply-To: <4278B436.6050102@logix-tt.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox