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

Improve copy_data error handling #499

Merged
merged 1 commit into from
Feb 25, 2023
Merged

Commits on Feb 24, 2023

  1. Improve copy_data error handling

    Make sure an error in put_copy_end doesn't lose the original exception.
    
    Use a dedicated error class PG::LostCopyState for errors due to another query while COPYing and mention that it's probably due to another query.
    Previously the "no COPY in progress" PG::Error was less specific.
    
    Remove transactions around the "another query" specs, previously the put_copy_data direction had a double fault due to another query while transaction is in error state.
    
    Use discard_result which we have now and which does essentially what previous error handling did.
    
    Cleanup temporary tables after running.
    
    Move definition of error classes to exception.rb, where they better fit into.
    larskanis committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    1563e73 View commit details
    Browse the repository at this point in the history