[HACKERS] NT + deadlock intended behaviour ?

2004-07-20 Thread Gaetano Mendola
Hi all, I'm doing some experiments with NT, I din't expect this behaviuor: create table test ( a integer ); insert into test values (3); insert into test values (4); insert into test values (5); insert into test values (6); SESSION 1;SESSION 2; begin;

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-18 Thread Alvaro Herrera
On Sun, Jul 18, 2004 at 01:38:57AM -0400, Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] writes: why SESSION 1 was unblocked ? ... Why that commit unblock the SESSION 1? IMHO session 1 should have been unblocked in both cases as soon as session 2's subtransaction failed. We have

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-18 Thread Gaetano Mendola
Alvaro Herrera wrote: On Sun, Jul 18, 2004 at 01:06:39AM +0200, Gaetano Mendola wrote: I'm doing some experiments with NT, I din't expect this behaviuor: First of all, let me point that the behavior on deadlock has been agreed to change. Instead of only aborting the innermost transaction, it

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-18 Thread Gaetano Mendola
Alvaro Herrera wrote: Gaetano, please apply the latest savepoints patch (savepoint-5.patch) and let me know how it goes ... where is it ? Regards Gaetano Mendola ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-18 Thread Alvaro Herrera
On Sun, Jul 18, 2004 at 11:00:25AM +0200, Gaetano Mendola wrote: Alvaro Herrera wrote: If I abort only the innermost transaction on session 2, the application writer can have a retry loop on it, so it will issue the begin again and the same update. Since session 1 is still locked, session 2

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-18 Thread Alvaro Herrera
On Sun, Jul 18, 2004 at 11:06:19AM +0200, Gaetano Mendola wrote: Alvaro Herrera wrote: Gaetano, please apply the latest savepoints patch (savepoint-5.patch) and let me know how it goes ... where is it ? I just sent it by private mail to you (11kb). I don't see it in the archives ... --

[HACKERS] NT + deadlock intended behaviour ?

2004-07-17 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm doing some experiments with NT, I din't expect this behaviuor: create table test ( a integer ); insert into test values (3); insert into test values (4); insert into test values (5); insert into test values (6); SESSION 1;

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-17 Thread Alvaro Herrera
On Sun, Jul 18, 2004 at 01:06:39AM +0200, Gaetano Mendola wrote: I'm doing some experiments with NT, I din't expect this behaviuor: First of all, let me point that the behavior on deadlock has been agreed to change. Instead of only aborting the innermost transaction, it will abort the whole

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-17 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: First of all, let me point that the behavior on deadlock has been agreed to change. Instead of only aborting the innermost transaction, it will abort the whole transaction tree. Who agreed to that? Your example is entirely unconvincing --- deadlock is

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-17 Thread Alvaro Herrera
On Sun, Jul 18, 2004 at 01:16:17AM -0400, Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: First of all, let me point that the behavior on deadlock has been agreed to change. Instead of only aborting the innermost transaction, it will abort the whole transaction tree. Who agreed

Re: [HACKERS] NT + deadlock intended behaviour ?

2004-07-17 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] writes: why SESSION 1 was unblocked ? ... Why that commit unblock the SESSION 1? IMHO session 1 should have been unblocked in both cases as soon as session 2's subtransaction failed. We have always made a practice of releasing a transaction's locks