question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unnecessary warning: there is no transaction in progress

See original GitHub issue

When committing a transaction, certain errors (e.g., serialization errors) may be cached by postgres driver. In the catch clause, postgres issues another commit. Issuing COMMIT when not inside a transaction does no harm, but it will provoke a warning message.

This troubles me because my test report is filled with random WARNING: there is no transaction in progress, which compromises the readability.

I think muting warning messages is suboptimal. I’ll draft an experimental PR. Please let me know if there are better ways to deal with this. Thanks.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Soremwarcommented, May 15, 2022

Closed in #393

0reactions
baoshancommented, May 14, 2022

I mean transaction.queryArray("COMMIT;"). Forget about it, that’s an abuse obviously.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does this PostgreSQL transaction give "WARNING
The WARNING obviously belongs to a different concurrent transaction, which did not start an explicit transaction. The commit is misplaced there, since it's ......
Read more >
there is no transaction in progress]" when using a PostgreSQL ...
The issue is just a warning that is received by Repository service due to a commit issued in the backend. The following statement...
Read more >
Catalogue warning: "there is no transaction in progress ...
Hello CTA developers team, We have a question about the Catalogue. We are currently running postgresql version 11-11.8-1 and the Catalogue schema is...
Read more >
"No transaction in progress" warning
Hello. We've recently discovered a bug in our code that resulted in COMMITs without BEGINs, and our client saw "no transaction in progress"...
Read more >
Huge amount of WARN in postgresql logs: WARNING: there is ...
WARNING : there is no transaction in progress WARNING: there is no transaction in progress WARNING: there is no transaction in progress WARNING: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found