Hannu Krosing <hannu@tm.ee> writes:
> It seems that our current way of enforcing uniqueness knows nothing
> about transactions ;(
>
> when you
>
> create table t(
> i int4 primary key
> );"""
>
> and then run the following query
>
> begin;
> delete from t where i=1;
> insert into t(i) values(1);
> end;
>
> in a loop from two parallel processes in a loop then one of them will
> almost instantaneously err out with
>
> ERROR: Cannot insert a duplicate key into unique index t_pkey
Have you tried running this test with transaction isolation set to
SERIALIZABLE?
-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time... --Dylan