X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id BD54CDB8C6 for ; Fri, 18 Nov 2005 06:16:00 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 92611-03 for ; Fri, 18 Nov 2005 10:16:01 +0000 (GMT) X-Greylist: delayed 00:06:26.554876 by SQLgrey- Received: from mail.gtech.kiev.ua (mail.gtech.kiev.ua [213.186.209.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5DF52DB6AB for ; Fri, 18 Nov 2005 06:15:56 -0400 (AST) Received: from localhost ([127.0.0.1]) by mail.gtech.kiev.ua for pgsql-jdbc@postgresql.org; Fri, 18 Nov 2005 11:11:34 +0200 Received: from dev-null (localhost [127.0.0.1]) by dev-null (Weasel v1.10) for ; 18 Nov 2005 12:09:16 +0200 From: "Vit Timchishin" To: "pgsql-jdbc@postgresql.org" Date: Fri, 18 Nov 2005 12:09:16 +0200 (EET) Reply-To: "Vit Timchishin" X-Mailer: PMMail 2.10.2010 for OS/2 Warp 4.05 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit Subject: Deadlock problem Message-ID: <200511181209.000000EC@dev-null> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200511/111 X-Sequence-Number: 14209 Hello. I have an multithreaded java application using postgresql. I am using UR mode (handling locking internally) and wa shoping to have no problems with locks. But now I have locking porlbme where there is only one thread calling posgresql and locking in wait. Looking at pg_lock I can see a lot of locks each holding exclusive a transaction (other two fields are empty). And for one transaction there is one PID holding Exclusive Lock and another waiting for shared lock for same transaction. I suppose that this means that I've first used connection object from one thread and this thread pid (linux x86-64) took exclusive lock and now another thread tries to use same connection and is going into lock. Am I correct? If so, why this exclusive locks are help while there no other queries executed? Or does this mean I can't use same connection object from different threads? С уважением, Виталий Валериевич Тимчишин, Технический Директор ООО "Голден Технолоджис" http://www.gtech-ua.com