On 4/22/11 8:17 PM, Tom Lane wrote:
Craig James writes:
On 4/22/11 1:58 PM, Tom Lane wrote:
Craig James writes:
select objectid from archive where db_id is null limit 1 for update
The interaction between LIMIT and FOR UPDATE changed in 9.0 ... what
PG version are you using?
8.4.4
Well, n
Craig James writes:
> On 4/22/11 1:58 PM, Tom Lane wrote:
>> Craig James writes:
>>> select objectid from archive where db_id is null limit 1 for update
>> The interaction between LIMIT and FOR UPDATE changed in 9.0 ... what
>> PG version are you using?
> 8.4.4
Well, note what it says in the 8
On 4/22/11 1:58 PM, Tom Lane wrote:
Craig James writes:
select objectid from archive where db_id is null limit 1 for update
The interaction between LIMIT and FOR UPDATE changed in 9.0 ... what
PG version are you using?
8.4.4
thanks,
Craig
regards, tom lane
--
Craig James writes:
>select objectid from archive where db_id is null limit 1 for update
The interaction between LIMIT and FOR UPDATE changed in 9.0 ... what
PG version are you using?
regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org
Craig James wrote:
> The sequence of operations goes like this (pseudo-code):
> The problem is that very occasionally the same ID will be issued
> twice. I don't see how this can be. Doesn't the "for update"
> guarantee that no other process can claim that same row?
I don't see a flaw in t
I thought I understood "select ... for update," but maybe not.
We have a number of separate databases and a unique integer identifier that's supposed to
be global across all databases. A single "archive" database is used to issue
the next available ID when a process wants to create a new objec
On Thu, Sep 28, 2006 at 03:26:36PM +, Mathias Laurent wrote:
> If I do :
> Session 1:
> decibel=# begin;
Does decibel have some meaning in some language other than english?
> BEGIN
> decibel=# select * from i where i=1 for update nowait;
> i
> ---
> 1
> (1 row)
>
> decibel=# begin;
> BEGIN
>
If I do :
Session 1:
decibel=# begin;
BEGIN
decibel=# select * from i where i=1 for update nowait;
i
---
1
(1 row)
decibel=# begin;
BEGIN
decibel=# select * from i where i=2 for update nowait;
i
---
2
(1 row)
Session 2 :
decibel=# select * from i where i=1 for update nowait;
ERROR: could not o