vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I managed to reproduce a locking problem, which is about blocking transactions and dead connections. How can this be avoided? What I did was: 1. Start a transaction on Client A 2. Execute a fcn doing an UPDATE on a certain record on client A 3. Execute a fcn doing an UPDATE on the same record on client B / as expected SQL on client B stalls untl client A's transaction ends/ 4. disconnect client A's network cable 5. kill the psql on client A / C.A's transaction still runs since two hours, C.B's SQL lasts for equal that time/ 6. wait on client B's statement to finish... 7. kill -TERM client A's postmaster / client B's statement succeeds Why is that? Why isn't client A's transaction detected as dead ? Yes, because the socked wasn't closed due to a network error. But this can happen all the time. What can I do? ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| ||||
| =?iso-8859-1?Q?K=D6PFERL_Robert?= <robert.koepferl@sonorys.at> writes: > Why is that? Why isn't client A's transaction detected as dead ? It will be eventually, when the TCP connection times out. The standard timeout is generally an hour or two :-( regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |