Re: Nested Transactions, Abort All
От | Dennis Bjorklund |
---|---|
Тема | Re: Nested Transactions, Abort All |
Дата | |
Msg-id | Pine.LNX.4.44.0407100743050.2838-100000@zigo.dhs.org обсуждение исходный текст |
Ответ на | Re: Nested Transactions, Abort All (Alvaro Herrera <alvherre@dcc.uchile.cl>) |
Список | pgsql-hackers |
On Fri, 9 Jul 2004, Alvaro Herrera wrote: > I mean this: > > begin; > ... work ...; > savepoint foo; > ... more work ...; > savepoint bar; > ... yet more ... ; > release foo; > > > At this time I can't release savepoint foo because the implementation > (nested) requires me to keep it open as long as savepoint bar exists. > If I released bar at a later time, I could close both, but not before. Yes, and that is exactly what should be done, what is wrong with that behaviour? If you do the same as above with nested transactions BEGIN; ... work ...; SUBBEGIN; ... more work ...; SUBBEGIN; ... yet more ... ; and now you can only commit the last subbegin. Subtransactions does not give you anything more then savepoints in this example. If anything there might be a possibility to do more with savepoints then nested transactions since as you say, you can release an earlier savepoint then the last. But that is something one can try to optimize later, if possible to optimize at all. Subtransactions can _not_ free more things then savepoints can. It's just an empty argument. In fact, I still see no real advantage to subtransactions at all. We are only playing the lock-in game when we introduce postgresql features that do almost the same thing as standard features. -- /Dennis Björklund
В списке pgsql-hackers по дате отправления: