Merge pull request #333 from brandonwamboldt/fix-pg91
Fix NOREPLICATION option for Postgres 9.1
This commit is contained in:
commit
7bd0d82fc2
1 changed files with 8 additions and 2 deletions
|
@ -56,10 +56,16 @@ define postgresql::server::role(
|
|||
}
|
||||
|
||||
if(versioncmp($version, '9.1') >= 0) {
|
||||
if $replication_sql == '' {
|
||||
postgresql_psql {"ALTER ROLE \"${username}\" NOREPLICATION":
|
||||
unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolreplication=${replication}",
|
||||
}
|
||||
} else {
|
||||
postgresql_psql {"ALTER ROLE \"${username}\" ${replication_sql}":
|
||||
unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolreplication=${replication}",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
postgresql_psql {"ALTER ROLE \"${username}\" CONNECTION LIMIT ${connection_limit}":
|
||||
unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolconnlimit=${connection_limit}",
|
||||
|
|
Loading…
Reference in a new issue