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

Clean up failed cursors before transaction abort #2185

Conversation

tanscorpio7
Copy link
Contributor

@tanscorpio7 tanscorpio7 commented Dec 27, 2023

Description

When we open a cursor, we pin the portal for this cursor internally. These pinned portals are then held before transaction abort in error handling to protect them from being cleaned up.
Now holding a pinned portal is only possible if the portal is in ready state. Trying to hold a pinned portal with any other status will result in error.

To fix this, we must unpin the cursor portal if it fails during a cursor fetch operation, since the portal is in failed state.

We also map the cursor does not exist error. This error is also not batch aborting.

Issues Resolved

[BABEL-4585]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Tanzeel Khan <[email protected]>
Signed-off-by: Tanzeel Khan <[email protected]>
Signed-off-by: Tanzeel Khan <[email protected]>
@coveralls
Copy link
Collaborator

coveralls commented Jan 5, 2024

Pull Request Test Coverage Report for Build 7421549123

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 72.252%

Totals Coverage Status
Change from base Build 7409492372: 0.005%
Covered Lines: 39630
Relevant Lines: 54850

💛 - Coveralls

@tanscorpio7 tanscorpio7 deleted the BABEL_4585 branch January 14, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants