| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Lars <lhofhansl(at)yahoo(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: deadlock using sequences? |
| Date: | 2002-10-07 12:44:17 |
| Message-ID: | 20021007124417.GD24034@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Sat, Oct 05, 2002 at 02:31:43AM -0700, Lars wrote:
> (Accidently posted to pgadmin-support.)
>
> Hi,
>
> I get occasional deadlocks when using sequences from
> multiple clients.
>
> Here's the table DDL:
>
> create sequence ids;
> create table foo( id integer default nextval('ids'),
> parent integer, type char(4), name text, value text )
> without oids;
> create index xml_id on xml(id);
>
> I'm inserting 1000s of tuples from 4-5 different
> clients (all use JDBC but are single threaded).
> About once every 1000 tuples I get
>
> ERROR: deadlock detected
>
> I can't use OIDS because I have to guarantee
> monotonically increasing ids.
Whatever it is, it's not the sequences causing this. Do you have any foreign
keys?
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas O'Dowd | 2002-10-07 12:46:11 | why isn't index used? |
| Previous Message | Martijn van Oosterhout | 2002-10-07 12:41:31 | Re: Boolean output format |