public inbox for [email protected]  
help / color / mirror / Atom feed
From: Istvan Soos <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: How to cleanup transaction after statement_timeout aborts a query?
Date: Sun, 8 Sep 2024 15:01:51 +0200
Message-ID: <CALdQGgtteEQYNWhT80gNG3xSsjw+p1xDhFiG-+CUMXR9Gy=wBg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CALdQGgv_an=JdfkomND7sJcuAS1L5OmbFzhQa9qcW48syTXyKg@mail.gmail.com>
	<[email protected]>

On Sun, Sep 8, 2024 at 1:19 PM Laurenz Albe <[email protected]> wrote:
> ROLLBACK and COMMIT are working: they end the transaction.

I have this reproduction test, and ROLLBACK does fail:
https://github.com/isoos/postgresql-dart/pull/363/files#diff-4547e49b04ec8280fb8f4f1ebf695b77f9a2d9a...

I've checked and nothing else is sent on the protocol, yet, for the
rollback statement it gets the 25P02 error.

> It is the atomicity guarantee of database transactions: either all statements
> succeed, or all fail.

Yeah, I thought so, that's why I'm struggling to see what's missing.

> To handle the failure of a statement while allowing the transaction to proceed,
> you can use savepoints.  But be warned: don't even think of setting a savepoint
> before each statement.  That would affect statement performance severely.

As the writer of the client library, I don't have the luxury of
telling users they need to change their way, hence I'm looking for any
pointer on the protocol level.

Thanks,
  Istvan






view thread (2+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: How to cleanup transaction after statement_timeout aborts a query?
  In-Reply-To: <CALdQGgtteEQYNWhT80gNG3xSsjw+p1xDhFiG-+CUMXR9Gy=wBg@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox