From: Robert Zenz <robert.zenz@sibvisions.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Information on savepoint requirement within transctions
Date: Fri, 26 Jan 2018 15:32:34 +0000
Message-ID: <5A6B4A12.9000002@sibvisions.com> (raw)
In-Reply-To: <CANu8Fixd_cKLouG_euktWHs12Nc7Ld5VXZ-qu13yuSs7HKnVPw@mail.gmail.com>
References: <5A6B3F78.6030908@sibvisions.com>
<CANu8Fixd_cKLouG_euktWHs12Nc7Ld5VXZ-qu13yuSs7HKnVPw@mail.gmail.com>
Well, no. What I'm looking for is information on how the transactions behave in
an error case, and why there is the requirement to have a savepoint in place to
be able to continue a transaction after a failed statement.
As far as I'm aware neither PostgreSQL nor OS version do matter for this, I'm
interested in the general behavior of the database. But as I said, I do find a
lot of documentation on transactions in general, but not about their behavior in
an error case.
Your first link is "kinda" what I'm looking for, because it closes with
> Moreover, ROLLBACK TO is the only way to regain control of a transaction
block that was put in aborted state by the system due to an error, short of
rolling it back completely and starting again.
and I'm looking on more information on *that*.
On 26.01.2018 15:59, Melvin Davidson wrote:
> On Fri, Jan 26, 2018 at 9:47 AM, Robert Zenz <robert.zenz@sibvisions.com>
> wrote:
>
>> I'm currently doing a small writeup of a bug fix in our framework which
>> involves
>> savepoints in PostgreSQL (JDBC). However, I have a hard time locating the
>> documentation regarding this. I mean, from what I can extract from various
>> sources, PostgreSQL requires to use savepoints if one wants to continue a
>> transaction after a failed statement, but I can't find where in the
>> documentation that is stated and documented.
>>
>> Can somebody point me to the correct location where this is documented and
>> maybe
>> even explained why that is the case?
>
>
> You have not specified which version of PostgreSQL you are using (or your
> O/S), but is this the documention you are looking for?
>
> https://www.postgresql.org/docs/9.6/static/tutorial-transactions.html
>
> https://www.postgresql.org/docs/9.6/static/sql-savepoint.html
>
> https://www.postgresql.org/docs/9.6/static/sql-rollback-to.html
>
> https://www.postgresql.org/docs/9.6/static/sql-release-savepoint.html
>
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: robert.zenz@sibvisions.com
Subject: Re: Information on savepoint requirement within transctions
In-Reply-To: <5A6B4A12.9000002@sibvisions.com>
References: <5A6B3F78.6030908@sibvisions.com> <CANu8Fixd_cKLouG_euktWHs12Nc7Ld5VXZ-qu13yuSs7HKnVPw@mail.gmail.com> <5A6B4A12.9000002@sibvisions.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