From: | SZŰCS Gábor <surrano(at)mailbox(dot)hu> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Killed backend won't rollback transaction? |
Date: | 2004-11-05 14:52:39 |
Message-ID: | 013b01c4c347$195212c0$0403a8c0@fejleszt4 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-sql |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-11-05 15:46:32 | Re: pg_ctl telling only half the truth |
Previous Message | Luiz K. Matsumura | 2004-11-05 14:52:35 | Re: Bug in pgAdminIII or in pg 8 beta3 ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Mickael Faivre-Macon | 2004-11-05 15:12:23 | Oracle to Postgres |
Previous Message | Michael L. Hostbaek | 2004-11-05 14:51:46 | Re: Group by and aggregates |