Killed backend won't rollback transaction?

Поиск
Список
Период
Сортировка
От SZŰCS Gábor
Тема Killed backend won't rollback transaction?
Дата
Msg-id 013b01c4c347$195212c0$0403a8c0@fejleszt4
обсуждение исходный текст
Ответы Re: Killed backend won't rollback transaction?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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.



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Markus Bertheau
Дата:
Сообщение: pg_ctl telling only half the truth
Следующее
От: "Luiz K. Matsumura"
Дата:
Сообщение: Re: Bug in pgAdminIII or in pg 8 beta3 ?