Subject: Re: How to cleanup transaction after statement_timeout aborts a query?

From: Istvan Soos <[email-masked]>
Date: Sun, 8 Sep 2024 16:02:34 +0200

On Sun, Sep 8, 2024 at 3:41 PM Laurenz Albe <[email-masked]> wrote:
> You must be doing something wrong then, because it works:

And you are right, I was doing something wrong:

The combination of the change and the library internals triggered a
SET statement_timeout TO 3000; before the ROLLBACK was sent, and the
error message I got was not clear on which statement triggered it.

I'm sorry for the noise.

Btw. Is there any guideline on how to write the client libraries or
recommendations/tests that a client library should follow?

Thanks,
  Istvan

---

From: Laurenz Albe <[email-masked]>
Date: Sun, 08 Sep 2024 16:18:32 +0200

On Sun, 2024-09-08 at 16:02 +0200, Istvan Soos wrote:
> [...]

No problem; I'm glad you could find the stumbling stone.

> recommendations/tests that a client library should follow?

I'm afraid this question is too generic for an answer...
I'd say it should be easy and intuitive to use, and should be as robust
as possible (return meaningful error messages rather than crash).

Yours,
Laurenz Albe