You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.
encoding - (Optional) Character set encoding to use in the database. Specify a string constant (e.g. UTF8 or SQL_ASCII), or an integer encoding number. If unset or set to an empty string the default encoding is set to UTF8. If set to DEFAULT Terraform will use the same encoding as the template database. Changing this value will force the creation of a new resource as this value can only be changed when a database is created.
However setting the encoding to DEFAULT value just causes an error
Use of `DEFAULT` is problematic because the user is specifying a value which
defeats the Terraform `Computed` resource attribute. A byproduct of this
is that use of `DEFAULT` can not be used without adding lifecycle attribute
otherwise the plan never converges.
```
resource "postgresql_database" "pg_default_opts" {
lifecycle {
ignore_changes = [
"template",
"encoding",
"lc_collate",
"lc_ctype",
"tablespace_name",
]
}
# snip
}
```
Fixes: #9
…connection handling.
As a necessary byproduct of supporting older versions of PostgreSQL
where shared_buffer handling is different, it was also necessary to
fix the connection handling. Previously the provider would check out
as many connections as it wanted and would basically never free them
or return them back to the sql.DB pool. After this change each query
performs the appropriate Exec and returns the connection back to the
pool. As a result, all tests pass and only ~2 connections are opened
at a time. I've set a default max_connections limit in the provider
of 4 but am allowing users to change this as they see fit in the
provider config.
Fixes: #8#9
This PR pulled in the fix from #10 as it was required to support PostgreSQL 9.2..
According to https://www.terraform.io/docs/providers/postgresql/r/postgresql_database.html#encoding
However setting the encoding to DEFAULT value just causes an error
How do we use template1 with
postgresql_database
resource with default encoding from the template?Terraform version is 0.9.8
The text was updated successfully, but these errors were encountered: