pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedMutex via database
2+ messages / 2 participants
[nested] [flat]
* Mutex via database
@ 2005-05-04 11:28 Enrico Weigelt <weigelt@metux.de>
2005-05-04 11:38 ` Re: Mutex via database Markus Schaber <schabi@logix-tt.com>
0 siblings, 1 reply; 2+ messages in thread
From: Enrico Weigelt @ 2005-05-04 11:28 UTC (permalink / raw)
To: pgsql-sql
Hi folks,
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 ?
thx
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact@metux.de
---------------------------------------------------------------------
Realtime Forex/Stock Exchange trading powered by postgresSQL :))
http://www.fxignal.net/
---------------------------------------------------------------------
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Mutex via database
2005-05-04 11:28 Mutex via database Enrico Weigelt <weigelt@metux.de>
@ 2005-05-04 11:38 ` Markus Schaber <schabi@logix-tt.com>
0 siblings, 0 replies; 2+ messages in thread
From: Markus Schaber @ 2005-05-04 11:38 UTC (permalink / raw)
To: pgsql-sql; +Cc: weigelt@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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-05-04 11:38 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-04 11:28 Mutex via database Enrico Weigelt <weigelt@metux.de>
2005-05-04 11:38 ` Markus Schaber <schabi@logix-tt.com>
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