what happens if a failed transaction is not rolled back?

From: Siddharth Jain <siddhsql(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: what happens if a failed transaction is not rolled back?
Date: 2023-04-24 15:37:13
Message-ID: CAPqV3pQms8Z5-v7vxZ9pRMxf7n0wOW+XUZ9cWjBP5=Fu=4_NFA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

thanks.

S.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-04-24 15:40:28 Re: [EXT] Re: SCROLLABLE/UPDATABLE cursor question
Previous Message Adrian Klaver 2023-04-24 15:36:32 Re: [EXT] Re: SCROLLABLE/UPDATABLE cursor question