From: Luca Ferrari <fluca1978@gmail.com>
To: Siddharth Jain <siddhsql@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: what happens if a failed transaction is not rolled back?
Date: Mon, 24 Apr 2023 18:24:30 +0200
Message-ID: <CAKoxK+4PRGL1v5i6CFwp0XfY2R85GoXVPA0aF8+_iyxECq4e2g@mail.gmail.com> (raw)
In-Reply-To: <CAPqV3pQms8Z5-v7vxZ9pRMxf7n0wOW+XUZ9cWjBP5=Fu=4_NFA@mail.gmail.com>
References: <CAPqV3pQms8Z5-v7vxZ9pRMxf7n0wOW+XUZ9cWjBP5=Fu=4_NFA@mail.gmail.com>
On Mon, Apr 24, 2023 at 5:37 PM Siddharth Jain <siddhsql@gmail.com> wrote:
> i am asking: what happens if a failed transaction is not rolled back?
A transaction either terminates by a commit or by a rollback. A failed
transaction is an opened transaction that can be terminated only by a
rollback.
If you don't rollback, then your transaction is hold by the driver,
that means for instance your pooler is not able to recycle it.
Clearly, the exact behavior depends by the driver.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: fluca1978@gmail.com, siddhsql@gmail.com
Subject: Re: what happens if a failed transaction is not rolled back?
In-Reply-To: <CAKoxK+4PRGL1v5i6CFwp0XfY2R85GoXVPA0aF8+_iyxECq4e2g@mail.gmail.com>
References: <CAPqV3pQms8Z5-v7vxZ9pRMxf7n0wOW+XUZ9cWjBP5=Fu=4_NFA@mail.gmail.com> <CAKoxK+4PRGL1v5i6CFwp0XfY2R85GoXVPA0aF8+_iyxECq4e2g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox