From: | Keary Suska <hierophant(at)pcisys(dot)net> |
---|---|
To: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: "select for update" confusion |
Date: | 2004-03-22 21:43:54 |
Message-ID: | BC84AC2A.EB6A%hierophant@pcisys.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
on 3/21/04 5:10 PM, ken(at)perfect-image(dot)com purportedly said:
> I'm trying to build a type of record "check out" program and I'm just
> a wee bit confused.
> Several users will be using the same select
> statement at the same time and just want to make sure they're getting
> different records. example.......
AFAIK, Postgres does not have exclusive row-level locking. I.e., your SELECT
.. For UPDATE only locks writes, and not reads (SELECTs). You can only
accomplish exclusive locks with a table lock (LOCK TABLE), which should
guarantee serial execution of all concurrent queries, but with a possible
performance penalty depending on your application.
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
From | Date | Subject | |
---|---|---|---|
Next Message | John Siracusa | 2004-03-22 21:53:29 | Re: Shared memory errors during initdb in Mac OS X |
Previous Message | Jerry LeVan | 2004-03-22 21:20:39 | Re: Shared memory errors during initdb in Mac OS X |