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

AWS RDS database instance needs to set max_connections and max_prepared_transactions #324

Open
1 task done
AWSmith0216 opened this issue Feb 6, 2025 · 1 comment
Open
1 task done
Labels
bug Something isn't working new Added to an issue when it's new ;)

Comments

@AWSmith0216
Copy link

Terraform Version Details

1.10.5

Terraform Variable File Details

Not relevant

Steps to Reproduce

Create an RDS instance using the basic terraform input of:

postgres_servers = {
  default = {},
}

Expected Behavior

That the server parameters include the SAS documented requirements of max_connections and max_prepared_transactions both set to at least 1024. Refer to documentation:

https://helpcenter.unx.sas.com/test/doc/en/itopscdc/v_061/itopssr/p05lfgkwib3zxbn1t6nyihexp12n.htm#p1wq8ouke3c6ixn1la636df9oa1u

Actual Behavior

Neither are set to the SAS documented values. Parameter max_connections is set to:

LEAST({DBInstanceClassMemory/9531392},5000)

For an 8 GB DB instance I believe this comes out to a value of about 901. Parameter max_prepared_transactions is set to 0, and not in the good way (infinite).

Additional Context

No response

References

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@AWSmith0216 AWSmith0216 added bug Something isn't working new Added to an issue when it's new ;) labels Feb 6, 2025
@AWSmith0216
Copy link
Author

Note that the following terraform input yields what I believe to be the desired result:

postgres_servers = {
  default = {
    parameters = [
        { 
          "apply_method": "pending-reboot", 
          name: "max_connections",
          value: "1024" 
        },
        { 
          "apply_method": "pending-reboot", 
          name: "max_prepared_transactions",
          value: "1024" 
        }
    ]
  }
}

Unfortunately an apply_method of immediate cannot be used with these parameters as they are static, and terraform will error out if attempted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new Added to an issue when it's new ;)
Projects
None yet
Development

No branches or pull requests

1 participant