Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-30 Thread Jeroen T. Vermeulen
On Thu, Jan 29, 2004 at 03:27:06PM -0400, Marc G. Fournier wrote: I would say that two such transactions concurrently heavily implies such, no? :) Like I said, the text tries to explain it--but it remains murky! ---(end of broadcast)--- TIP 3:

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Jeroen T. Vermeulen
On Thu, Jan 29, 2004 at 01:33:48PM -0400, Marc G. Fournier wrote: What happens if I abort on the first transaction? If I'm reading this Doesn't matter, because your second transaction doesn't read any of the changes you're making there--until (and if) that first one commits. The second

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Jeroen T. Vermeulen
On Thu, Jan 29, 2004 at 06:54:21PM +0100, Jeroen T. Vermeulen wrote: On Thu, Jan 29, 2004 at 01:33:48PM -0400, Marc G. Fournier wrote: What happens if I abort on the first transaction? If I'm reading this AFAICS the part about not having inconsistencies refers only to the spectre of

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Chris Bowlby
Would this not create the potention for a dead lock if transaction1 is never completed, and still active for an indefinate period of time? On Thu, 2004-01-29 at 14:06, Tom Lane wrote: Marc G. Fournier [EMAIL PROTECTED] writes: What happens if I abort on the first transaction? If I'm reading

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Tom Lane
Chris Bowlby [EMAIL PROTECTED] writes: Would this not create the potention for a dead lock if transaction1 is never completed, and still active for an indefinate period of time? If trans1 later waits (directly or indirectly) for trans2, we'll detect the deadlock and abort one xact or the other

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Jeroen T. Vermeulen
On Thu, Jan 29, 2004 at 02:07:25PM -0400, Marc G. Fournier wrote: If two such transactions concurrently try to change the balance of account 12345, we clearly want the second transaction to start from the updated version of the account's row To me, I read this as the first transaction has

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Marc G. Fournier
On Thu, 29 Jan 2004, Jeroen T. Vermeulen wrote: On Thu, Jan 29, 2004 at 02:07:25PM -0400, Marc G. Fournier wrote: If two such transactions concurrently try to change the balance of account 12345, we clearly want the second transaction to start from the updated version of the account's

Re: [HACKERS] Stupid question on Read Committed Isolation Level

2004-01-29 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Marc G. Fournier [EMAIL PROTECTED] writes: What happens if I abort on the first transaction? If I'm reading this right, if Trans2 does the exact same as above, and COMMITs before Trans1 Aborts, the value of balance becomes +200 (Trans2 + Trans1) ... but