From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-sql@postgresql.org
Cc: jrpogo@yahoo.com
Subject: Re: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST
Date: Fri, 23 May 2003 13:16:16 +0200
Message-ID: <3ECE0300.4D57E12F@rodos.fzk.de> (raw)
>
> I am programming using libpq under Linux.
>
> When I do a "select ... for update" to lock a row, how=20
> would I allow user to cancel or timeout when requesting the
> the same row from another program/transaction.
>
> I do not want the user to have to wait for the update on the=20
> other end. I would rather send the user an error message
> saying that the record is LOCKED -- try again later.
>
> If you could send me an example that would be great!
>
There was a strongly related discussion on the pgsql-sql list in
February 2003. Search the archives for threads
"Lock timeout detection"
"Can pessimistic locking be emulated?"
If you're having trouble to find those, contact me again.
I recorded the major important stuff - at least I think.
Regards, Christoph
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: ch@rodos.fzk.de, jrpogo@yahoo.com
Subject: Re: libpq program SELECT FOR UPDATE and TIMEOUT or CANCEL REQUEST
In-Reply-To: <3ECE0300.4D57E12F@rodos.fzk.de>
* 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