Discussion:
commit after dead lock
(too old to reply)
Gaetano Mendola
2004-01-30 00:25:40 UTC
Permalink
Hi all,
is it normal that postgres dont complain
doing a commit after a deadlock ?

kalman=# select * from test where a = 5 for update;
ERROR: deadlock detected
DETAIL: Process 4144 waits for ShareLock on transaction 40180; blocked
by process 4141.
Process 4141 waits for ShareLock on transaction 40181; blocked by
process 4144.
kalman=# commit;
COMMIT
kalman=#


Regards
Gaetano Mendola


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Stephan Szabo
2004-01-30 01:11:07 UTC
Permalink
Post by Gaetano Mendola
Hi all,
is it normal that postgres dont complain
doing a commit after a deadlock ?
kalman=# select * from test where a = 5 for update;
ERROR: deadlock detected
DETAIL: Process 4144 waits for ShareLock on transaction 40180; blocked
by process 4141.
Process 4141 waits for ShareLock on transaction 40181; blocked by
process 4144.
kalman=# commit;
COMMIT
It's not really any different than other errors. The commit doesn't
complain (although it also doesn't actually commit anything).

sszabo=# begin;
BEGIN
sszabo=# select * from foo;
ERROR: relation "foo" does not exist
sszabo=# commit;
COMMIT


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Tom Lane
2004-01-30 03:50:30 UTC
Permalink
Post by Stephan Szabo
It's not really any different than other errors. The commit doesn't
complain (although it also doesn't actually commit anything).
People have occasionally suggested that the command tag from a COMMIT
should read "ABORT" or "ROLLBACK" if the transaction was previously
aborted. I don't have a strong feeling about it one way or the other.
It'd clearly be helpful for human users, but I could see it confusing
programs that expect the existing behavior of command tag always
matching command.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Gaetano Mendola
2004-01-30 09:47:29 UTC
Permalink
Post by Tom Lane
Post by Stephan Szabo
It's not really any different than other errors. The commit doesn't
complain (although it also doesn't actually commit anything).
People have occasionally suggested that the command tag from a COMMIT
should read "ABORT" or "ROLLBACK" if the transaction was previously
aborted. I don't have a strong feeling about it one way or the other.
It'd clearly be helpful for human users, but I could see it confusing
programs that expect the existing behavior of command tag always
matching command.
Well, I agree but I think that is better at least rise a
warning.


regards
Geetano Mendola


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ***@postgresql.org)
Loading...