Re: what happens if a failed transaction is not rolled back?
От
David G. Johnston
Тема
Re: what happens if a failed transaction is not rolled back?
Дата
Msg-id
CAKFQuwZLqqiwmNjzO=RxztMqTQ+FBu8ti9p0Gb00ZS7iW4tM7w@mail.gmail.com
Ответ на
what happens if a failed transaction is not rolled back? (Siddharth Jain)
Список
Дерево обсуждения
what happens if a failed transaction is not rolled back? Siddharth Jain <siddhsql@gmail.com>
Re: what happens if a failed transaction is not rolled back? "David G. Johnston" <david.g.johnston@gmail.com>
Re: what happens if a failed transaction is not rolled back? David Wheeler <hippysoyboy@gmail.com>
Re: what happens if a failed transaction is not rolled back? "David G. Johnston" <david.g.johnston@gmail.com>
Re: what happens if a failed transaction is not rolled back? Tom Lane <tgl@sss.pgh.pa.us>
Re: what happens if a failed transaction is not rolled back? Merlin Moncure <mmoncure@gmail.com>
Re: what happens if a failed transaction is not rolled back? Tom Lane <tgl@sss.pgh.pa.us>
Re: what happens if a failed transaction is not rolled back? Merlin Moncure <mmoncure@gmail.com>
Re: what happens if a failed transaction is not rolled back? Luca Ferrari <fluca1978@gmail.com>
Re: what happens if a failed transaction is not rolled back? Adrian Klaver <adrian.klaver@aklaver.com>
Re: what happens if a failed transaction is not rolled back? Adrian Klaver <adrian.klaver@aklaver.com>
On Mon, Apr 24, 2023 at 8:37 AM Siddharth Jain <siddhsql@gmail.com> wrote:
Hi All,i understand when writing application code, we should rollback a transaction that fails to commit. this is typically done in the catch block of a try-catch exception handler. but what if the developer does not rollback the transaction? what happens in that case?note that i am not asking: what happens if a transaction is not rolled back?i am asking: what happens if a failed transaction is not rolled back?failed transaction = you try to commit it but get an exception back from the database.
There isn't anything special about a failed transaction compared to any other transaction that you leave open.
Might help to describe what the application does with the connection subsequent to the point of attempted commit.
David J.
В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата: