Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library close transaction #29

Closed
maranqz opened this issue Nov 23, 2022 · 2 comments
Closed

Library close transaction #29

maranqz opened this issue Nov 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@maranqz
Copy link
Member

maranqz commented Nov 23, 2022

pgx closes transaction on error.
Then the lib returns missing error of "commit unexpectedly resulted in rollback".

@maranqz maranqz added the bug Something isn't working label Nov 23, 2022
@hound672
Copy link
Contributor

I checked this behavior in #76
If I return trm.ErrSkip in transaction section transaction will be commited.
Is this correct?

@maranqz
Copy link
Member Author

maranqz commented Aug 15, 2023

ErrSkip doesn't connect with ErrTxCommitRollback.
ErrSkip allows to commit on an application error not a database.

I think, I can close this issue, because the pgx docs said: PostgreSQL accepts COMMIT on aborted transactions, but px is treated as ROLLBACK.

The libs cannot fix this behavior.

@maranqz maranqz closed this as completed Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants