Skip to content

feat(cloudsqlpg): run SELECT 1 after successful connection attempt#2997

Open
srividyareddy786 wants to merge 2 commits intogoogleapis:mainfrom
srividyareddy786:ping
Open

feat(cloudsqlpg): run SELECT 1 after successful connection attempt#2997
srividyareddy786 wants to merge 2 commits intogoogleapis:mainfrom
srividyareddy786:ping

Conversation

@srividyareddy786
Copy link
Copy Markdown
Contributor

@srividyareddy786 srividyareddy786 commented Apr 8, 2026

Description

Should include a concise description of the changes (bug or feature), it's
impact, along with a summary of the solution

Update the initialization logic to execute a "SELECT 1" statement immediately after a successful ping. This confirms that the database engine is not only reachable but also ready to parse and execute SQL commands.

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #2996

@srividyareddy786 srividyareddy786 marked this pull request as ready for review April 8, 2026 13:39
@srividyareddy786 srividyareddy786 requested review from a team as code owners April 8, 2026 13:39
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the initialization of the Cloud SQL PostgreSQL source by adding a SELECT 1 health check and ensuring the connection pool is properly closed upon failure of either the initial ping or the health check. I have no feedback to provide.

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.

run SELECT 1 after successful connection attempt

2 participants