Skip to content

Conversation

@eidam
Copy link

@eidam eidam commented Sep 14, 2025

Cloud SQL for PostgreSQL read pools are GA now, adding a support creating a read replica as a read pool.

The google_sql_database_instance resource supports it already, the only difference is node_count and instance_type to be READ_POOL_INSTANCE.

@eidam eidam requested review from a team, ayushmjain, imrannayer and q2w as code owners September 14, 2025 11:26
@google-cla
Copy link

google-cla bot commented Sep 14, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@eidam eidam force-pushed the e/postgres-read-pools branch from 22c9f23 to 0e14063 Compare September 14, 2025 11:52
@imrannayer
Copy link
Collaborator

@eidam thx for the PR. Can you plz generate README. Follow this doc

@eidam
Copy link
Author

eidam commented Dec 4, 2025

@imrannayer thanks for the review, added node_count validation + updated readme

for the additional read_pool_auto_scale_config i would look into outside of this PR scope later

@imrannayer imrannayer changed the title feat(postgres): support read pools feat: Add support for read pools in postgres Dec 4, 2025
@imrannayer
Copy link
Collaborator

/gcbrun

@imrannayer
Copy link
Collaborator

@eidam failing with following error

TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185: Error: Operation failed
TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185: 
TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185:   on ../../modules/postgresql/variables.tf line 401, in variable "read_replicas":
TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185:  401:     condition     = length([for replica in var.read_replicas : false if contains(keys(replica), "node_count") && (replica.node_count < 1 || replica.node_count > 20)]) == 0
TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185:     ├────────────────
TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185:     │ replica.node_count is null
TestPostgreSqlPscModule 2025-12-04T16:51:27Z command.go:185:

@eidam
Copy link
Author

eidam commented Dec 8, 2025

Weird, I was running make lint locally without errors

I likely won’t get into this until eoy, anyone feel free to pick this up

@imrannayer
Copy link
Collaborator

fixed in #777

@imrannayer imrannayer closed this Dec 10, 2025
@eidam
Copy link
Author

eidam commented Dec 10, 2025

read pool != connection pool, but i will reopen once i get around this again

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