Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZWPEh-0005jS-A7 for pgsql-bugs@arkaria.postgresql.org; Mon, 31 Aug 2015 13:34:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZWPEg-00054v-Rt for pgsql-bugs@arkaria.postgresql.org; Mon, 31 Aug 2015 13:34:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZWK4T-0003UI-Tu for pgsql-bugs@postgresql.org; Mon, 31 Aug 2015 08:04:05 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZWK4R-0004i1-7p for pgsql-bugs@postgresql.org; Mon, 31 Aug 2015 08:04:05 +0000 MIME-Version: 1.0 Subject: BUG #13598: Hang forever, but must rollback (deadlock) To: pgsql-bugs@postgresql.org From: immortaldragonm@gmail.com Date: Mon, 31 Aug 2015 08:03:51 +0000 Message-ID: <20150831080351.2088.33853@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13598 Logged by: ImmortalDragon Email address: immortaldragonm@gmail.com PostgreSQL version: 9.4.4 Operating system: windows Description: table: CREATE TABLE t1(id integer primary key); libpq code: c1 = PQconnectdb(conninfo); c2 = PQconnectdb(conninfo); res1 = PQexec(c1, "BEGIN"); PQclear(res1); res1 = PQexec(c1, "INSERT INTO t1 (id) VALUES (104)"); PQclear(res1); res2 = PQexec(c2, "BEGIN"); PQclear(res2); res2 = PQexec(c2, "INSERT INTO t1 (id) VALUES (104)"); //hang here PQclear(res2); res2 = PQexec(c2, "END"); PQclear(res2); res1 = PQexec(c1, "END"); PQclear(res1); I use different connection in one thread (like different programs, as i undestand). I think, that postgres must detect deadlock and rollback one of transaction with error. But it hang forever. Why? i think it's bug. deadlock_timeout - default (1s) i check other version of postgres, same result. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs