pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pablo Funes <pablo@cs.brandeis.edu>
To: pgsql-interfaces@postgresql.org
Subject: nonblocking lock?
Date: Mon, 12 Apr 1999 17:19:37 -0400 (EDT)
Message-ID: <199904122119.RAA31982@mancha.cs.brandeis.edu> (raw)

Is it possible to do a nonblocking lock? That is, 
I want several clients to execute,

    begin
    if table A is locked
    then
        go around doing stuff on other tables
    else
        lock A and do stuff on A
    endif

the problem is, if I use normal lock, then 
after one client has locked and is doing stuff on A
the other one will block and thus it won't be able
to go around doing stuff on other tables. Is it
possible to do a nonblocking lock that will just
fail if the table is locked already? 

Thank you 

Pablo Funes
Brandeis University
pablo@cs.brandeis.edu



Message-ID: <199904122119.RAA31982@mancha.cs.brandeis.edu>
Permalink:  ../199904122119.RAA31982@mancha.cs.brandeis.edu/
Also on:    postgresql.org/message-id/199904122119.RAA31982@mancha.cs.brandeis.edu

 · 

reply

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-interfaces@postgresql.org
  Cc: pablo@cs.brandeis.edu
  Subject: Re: nonblocking lock?
  In-Reply-To: <199904122119.RAA31982@mancha.cs.brandeis.edu>

* 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