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

postgresql_database is running forever #514

Open
SamuelMolling opened this issue Feb 17, 2025 · 3 comments
Open

postgresql_database is running forever #514

SamuelMolling opened this issue Feb 17, 2025 · 3 comments

Comments

@SamuelMolling
Copy link

We are creating a database within an RDS. We have been creating it the same way for months and there have never been any problems.

What is currently happening is that the database's apply runs for days and never finishes. The plan happens naturally, but the apply gets stuck.

The only change we noticed was the RDS version going from 15 to 16. Have you ever experienced this at any time?

Regards,
Sam

@SamuelMolling
Copy link
Author

  # module.postgres_roles.postgresql_database.default will be created
+   resource "postgresql_database" "default" {
+       allow_connections      = true
+       alter_object_ownership = false
+       connection_limit       = -1
+       encoding               = "UTF8"
+       id                     = (known after apply)
+       is_template            = (known after apply)
+       lc_collate             = "C"
+       lc_ctype               = (known after apply)
+       name                   = "db_name"
+       owner                  = "postgres"
+       tablespace_name        = (known after apply)
+       template               = (known after apply)
    }

@SamuelMolling
Copy link
Author

Provider:

provider "postgresql" {
  scheme          = "awspostgres"
  host            = "${dependency.cluster.outputs.cluster_endpoint}"
  username        = "postgres"
  password        = "${dependency.cluster.outputs.password}"
  connect_timeout = 60
  superuser       = false
  max_connections = 1
}

@SamuelMolling
Copy link
Author

I noticed that the problem appears when I set max_connections = 1, but sometimes setting a higher value gives a concurrency error. From what I saw, PR #510 already solves this, waiting.

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

No branches or pull requests

1 participant