Re: Current transaction is aborted, commands ignored until end of transaction block
От | Tom Lane |
---|---|
Тема | Re: Current transaction is aborted, commands ignored until end of transaction block |
Дата | |
Msg-id | 26063.1325287167@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Current transaction is aborted, commands ignored until end of transaction block (Jan Bakuwel <jan.bakuwel@greenpeace.org>) |
Ответы |
Re: Current transaction is aborted, commands ignored until end
of transaction block
|
Список | pgsql-sql |
Jan Bakuwel <jan.bakuwel@greenpeace.org> writes: > Why-o-why have the PostgreSQL developers decided to do it this way...? Because starting and cleaning up a subtransaction is an expensive thing. If we had auto-rollback at the statement level, you would be paying that overhead for every statement in every transaction, whether you need it or not (since obviously there's no way to forecast in advance whether a statement will fail). Making it depend on explicit savepoints allows the user/application to control whether that overhead is expended or not. If you want to pay that price all the time, there are client-side frameworks that will do it for you, or you can roll your own easily enough. So we do not see it as a big deal that the database server itself doesn't act that way. regards, tom lane
В списке pgsql-sql по дате отправления: