BUG #13598: Hang forever, but must rollback (deadlock)

From: immortaldragonm(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13598: Hang forever, but must rollback (deadlock)
Date: 2015-08-31 08:03:51
Message-ID: 20150831080351.2088.33853@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13598
Logged by: ImmortalDragon
Email address: immortaldragonm(at)gmail(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2015-08-31 13:39:21 Re: BUG #13598: Hang forever, but must rollback (deadlock)
Previous Message Michael Paquier 2015-08-31 07:25:53 Re: PQexec() hangs on OOM