X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F22F13A3B07 for ; Fri, 5 Nov 2004 14:53:21 +0000 (GMT) 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 33807-10 for ; Fri, 5 Nov 2004 14:53:09 +0000 (GMT) Received: from fe06.axelero.hu (fe06.axelero.hu [195.228.240.94]) by svr1.postgresql.org (Postfix) with ESMTP id B7F863A3BDB for ; Fri, 5 Nov 2004 14:53:11 +0000 (GMT) Received: from fe06 (localhost-02 [127.0.2.1]) by fe06.axelero.hu (8.12.11/8.12.11) with SMTP id iA5ErBSG040365 for ; Fri, 5 Nov 2004 15:53:11 +0100 (CET) Received: from fe06.axelero.hu [127.0.2.1] via SMTP gateway by fe06 [195.228.240.94]; id A09D9FEF5B7 at Fri, 05 Nov 2004 15:53:10 +0100 Received: from fejleszt4 (121-248-182-81.adsl-fixip.axelero.hu [81.182.248.121]) by fe06.axelero.hu (8.12.11/8.12.11) with SMTP id iA5Er9mn040317 for ; Fri, 5 Nov 2004 15:53:10 +0100 (CET) Message-ID: <013b01c4c347$195212c0$0403a8c0@fejleszt4> From: =?iso-8859-2?B?U1rbQ1MgR+Fib3I=?= To: References: <012601c4c292$6804b810$0403a8c0@fejleszt4> <26896.1099590388@sss.pgh.pa.us> <011201c4c33b$7bd722c0$0403a8c0@fejleszt4> Subject: Killed backend won't rollback transaction? Date: Fri, 5 Nov 2004 15:52:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-RAVMilter-Version: 8.4.3(snapshot 20030217) (fe06.axelero.hu) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/57 X-Sequence-Number: 9828 Dear Gurus, Version: PostgreSQL 7.4.3 on Linux. I have two transactions trying to insert the same value in a unique index (pkey). Tested and if I simpy try two plain sql backends, everything's ok. However, mine is a silly scenario. Obviously, the first one locks something (I assume the tuple) since the other one goes waiting. If I end this transaction (either by COMMIT or ROLLBACK), the other transaction resumes (either by pkey violation error or successful insert). BUT if I kill the first transaction (with standard (15 Terminate) signal), the second one stucks in "waiting". I know it's not recommended to "kill -9 the postmaster", but it's plain "kill", and I couldn't circumvent it. What happend is that I * called a plpgsql function that inserted in this pkey, then * called a C function that * called system() that * called php that inserted the same value via another connection, sentenced to waiting. The process hung, with no cancellation possible (the backend wrote "Cancel request sent" but nothing happened -- system() ignores interrupts). I fixed the lock, but I wondered if it's considered a bug. TIA, G.