Skip to content

PostgreSQL: Rolling back a failed transaction with COPY results in expecting ParseComplete but received CommandComplete #3139

Closed

Description

@feikesteenbergen

Bug Description

When

  • using copy_out_raw
  • which has a runtime failure
  • which runs inside a transaction
  • when the tx is rolled back
  • the main connection is no longer usable due to a protocol error

Minimal Reproduction

this PR has the testcase which reproduces my error, as well as a tentative solution for a fix.

Info

  • SQLx version: 0.8.0-alpha.0
  • SQLx features enabled: postgres, runtime-tokio
  • Database server and version: PostgreSQL 16.2
  • Operating system: Ubuntu 22.04 x86_64
  • rustc --version: 1.77.0-beta.9

Activity

  1. changed the title [-]Rolling back a failed subtransaction with COPY results in `expecting ParseComplete but received CommandComplete`[/-] [+]PostgreSQL: Rolling back a failed subtransaction with COPY results in `expecting ParseComplete but received CommandComplete`[/+] on Mar 21, 2024
  2. changed the title [-]PostgreSQL: Rolling back a failed subtransaction with COPY results in `expecting ParseComplete but received CommandComplete`[/-] [+]PostgreSQL: Rolling back a failed transaction with COPY results in `expecting ParseComplete but received CommandComplete`[/+] on Apr 4, 2024
  3. abonander commented on Apr 19, 2024

    @abonander
    Collaborator

    fixed by #3138 (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions