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

fix: close (intead of release) the duckdb connection #301

Merged
merged 6 commits into from
Dec 19, 2024
Merged

Conversation

fanyang01
Copy link
Contributor

@fanyang01 fanyang01 commented Dec 19, 2024

Previously, we used sql.Conn.Close() to indicate a connection was no longer needed. However, this merely returned the connection to the sql.DB connection pool without closing it or resetting its state. This PR updates the behavior to ensure the connection is truly closed.

Resolves #204

@fanyang01 fanyang01 requested review from Copilot and VWagen1989 and removed request for Copilot December 19, 2024 09:05
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • test/bats/postgres/cli.bats: Language not supported
  • test/bats/postgres/helper.bash: Language not supported
Comments suppressed due to low confidence (1)

backend/connpool.go:118

  • [nitpick] The comment should be more precise: 'Returning driver.ErrBadConn ensures the connection is closed and not returned to the pool.'
// When driver.ErrBadConn is returned here, the connection will not be put back into the pool and will be closed instead.

backend/connpool.go Outdated Show resolved Hide resolved
@fanyang01 fanyang01 merged commit c23f2b0 into main Dec 19, 2024
12 checks passed
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.

[pg] DISCARD ALL does not remove the temporary tables
1 participant