Re: Is function atomic?
От | Peter Eisentraut |
---|---|
Тема | Re: Is function atomic? |
Дата | |
Msg-id | Pine.LNX.4.30.0107061844440.679-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Is function atomic? (Wei Weng <wweng@kencast.com>) |
Ответы |
Re: Is function atomic?
|
Список | pgsql-sql |
Wei Weng writes: > Does that mean if I used > DECLARE > ... > BEGIN > DO_STUFF > END; > > the DO_STUFF will not be interrupted (maintain atomicity) even when > multiple threads use the function concurrently? Interruption, atomicity, and concurrency are separate issues. The function could of course be interrupted if there's an error. (That error may be related to concurrency, such as a serialization failure.) The database interactions of the function will be atomic in the sense that rollback will work. Concurrent execution of a function is permitted, but there may be issues if you modify global state or there is a serialization failure. These are the same issues that you have to deal with in any programming environment. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
В списке pgsql-sql по дате отправления: