diff --git a/REFERENCE.md b/REFERENCE.md
index 03e2f0f36d..bb51deb071 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -1030,7 +1030,7 @@ Default value: `$postgresql::params::listen_addresses`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on.
@@ -1937,7 +1937,7 @@ Default value: `$postgresql::server::psql_path`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Specifies the port to access the server. Default value: The default user for the module, usually '5432'.
@@ -2042,7 +2042,7 @@ Default value: `undef`
##### `port`
-Data type: `Optional[Variant[String[1], Stdlib::Port]]`
+Data type: `Optional[Stdlib::Port]`
Port to use when connecting.
@@ -2169,7 +2169,7 @@ Default value: `$postgresql::server::user`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Port to use when connecting.
@@ -2271,7 +2271,7 @@ Default value: `$postgresql::server::user`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Port to use when connecting.
@@ -2352,7 +2352,7 @@ Default value: `$postgresql::server::listen_addresses`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
@@ -2776,7 +2776,7 @@ Default value: `$postgresql::server::psql_path`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
@@ -2835,7 +2835,7 @@ Default value: `$postgresql::server::psql_path`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
@@ -2973,7 +2973,7 @@ Default value: `$postgresql::server::user`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
@@ -3210,7 +3210,7 @@ Default value: `$postgresql::server::user`
##### `port`
-Data type: `Variant[String[1], Stdlib::Port]`
+Data type: `Stdlib::Port`
Port to use when connecting.
@@ -3456,7 +3456,7 @@ Default value: `$postgresql::server::default_database`
##### `port`
-Data type: `Optional[Variant[String[1], Stdlib::Port]]`
+Data type: `Optional[Stdlib::Port]`
Port to use when connecting.
@@ -3691,7 +3691,7 @@ Default value: `undef`
##### `port`
-Data type: `Optional[Variant[String[1], Stdlib::Port]]`
+Data type: `Optional[Stdlib::Port]`
Port to use when connecting.
diff --git a/manifests/server.pp b/manifests/server.pp
index c226217310..25c607bb48 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -133,7 +133,7 @@
String[1] $default_database = $postgresql::params::default_database,
Hash $default_connect_settings = $postgresql::globals::default_connect_settings,
Optional[Variant[String[1], Array[String[1]]]] $listen_addresses = $postgresql::params::listen_addresses,
- Variant[String[1], Stdlib::Port] $port = $postgresql::params::port,
+ Stdlib::Port $port = $postgresql::params::port,
String[1] $ip_mask_deny_postgres_user = $postgresql::params::ip_mask_deny_postgres_user,
String[1] $ip_mask_allow_all_users = $postgresql::params::ip_mask_allow_all_users,
Array[String[1]] $ipv4acls = $postgresql::params::ipv4acls,
@@ -191,11 +191,7 @@
Hash $backup_options = {},
Enum['pg_dump'] $backup_provider = $postgresql::params::backup_provider,
) inherits postgresql::params {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
$_version = $postgresql::params::version
-
if $createdb_path != undef {
warning('Passing "createdb_path" to postgresql::server is deprecated, it can be removed safely for the same behaviour')
}
diff --git a/manifests/server/default_privileges.pp b/manifests/server/default_privileges.pp
index 5dad6bbab0..6a9541864e 100644
--- a/manifests/server/default_privileges.pp
+++ b/manifests/server/default_privileges.pp
@@ -28,16 +28,13 @@
String $schema = 'public',
String $psql_db = $postgresql::server::default_database,
String $psql_user = $postgresql::server::user,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
Hash $connect_settings = $postgresql::server::default_connect_settings,
Enum['present', 'absent'] $ensure = 'present',
String $group = $postgresql::server::group,
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
Optional[String] $target_role = undef,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
# If possible use the version of the remote database, otherwise
# fallback to our local DB version
if $connect_settings != undef and 'DBVERSION' in $connect_settings {
diff --git a/manifests/server/extension.pp b/manifests/server/extension.pp
index 6063329003..308ae788e1 100644
--- a/manifests/server/extension.pp
+++ b/manifests/server/extension.pp
@@ -29,13 +29,10 @@
Optional[String[1]] $version = undef,
Enum['present', 'absent'] $ensure = 'present',
Optional[String[1]] $package_name = undef,
- Optional[Variant[String[1], Stdlib::Port]] $port = undef,
+ Optional[Stdlib::Port] $port = undef,
Hash $connect_settings = postgresql::default('default_connect_settings'),
String[1] $database_resource_name = $database,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
$user = postgresql::default('user')
$group = postgresql::default('group')
$psql_path = postgresql::default('psql_path')
diff --git a/manifests/server/grant.pp b/manifests/server/grant.pp
index 5b72b33bbd..ec4d5d2c98 100644
--- a/manifests/server/grant.pp
+++ b/manifests/server/grant.pp
@@ -41,16 +41,13 @@
Array[String[1],0] $object_arguments = [],
String $psql_db = $postgresql::server::default_database,
String $psql_user = $postgresql::server::user,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
Boolean $onlyif_exists = false,
Hash $connect_settings = $postgresql::server::default_connect_settings,
Enum['present', 'absent'] $ensure = 'present',
String $group = $postgresql::server::group,
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
case $ensure {
default: {
# default is 'present'
diff --git a/manifests/server/grant_role.pp b/manifests/server/grant_role.pp
index 9256f06995..a061a8341f 100644
--- a/manifests/server/grant_role.pp
+++ b/manifests/server/grant_role.pp
@@ -13,12 +13,9 @@
Enum['present', 'absent'] $ensure = 'present',
String[1] $psql_db = $postgresql::server::default_database,
String[1] $psql_user = $postgresql::server::user,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
Hash $connect_settings = $postgresql::server::default_connect_settings,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
case $ensure {
'present': {
$command = "GRANT \"${group}\" TO \"${role}\""
diff --git a/manifests/server/instance/config.pp b/manifests/server/instance/config.pp
index 7b8e08b2a9..ba34a0276e 100644
--- a/manifests/server/instance/config.pp
+++ b/manifests/server/instance/config.pp
@@ -48,7 +48,7 @@
String[1] $ip_mask_deny_postgres_user = $postgresql::server::ip_mask_deny_postgres_user,
String[1] $ip_mask_allow_all_users = $postgresql::server::ip_mask_allow_all_users,
Optional[Variant[String[1], Array[String[1]]]] $listen_addresses = $postgresql::server::listen_addresses,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
Array[String[1]] $ipv4acls = $postgresql::server::ipv4acls,
Array[String[1]] $ipv6acls = $postgresql::server::ipv6acls,
Variant[String[1], Stdlib::Absolutepath] $pg_hba_conf_path = $postgresql::server::pg_hba_conf_path,
@@ -73,9 +73,6 @@
Optional[Postgresql::Pg_password_encryption] $password_encryption = $postgresql::server::password_encryption,
Optional[String] $extra_systemd_config = $postgresql::server::extra_systemd_config,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
if ($manage_pg_hba_conf == true) {
# Prepare the main pg_hba file
concat { $pg_hba_conf_path:
diff --git a/manifests/server/instance/late_initdb.pp b/manifests/server/instance/late_initdb.pp
index 43a1d404ce..ef7971cd0a 100644
--- a/manifests/server/instance/late_initdb.pp
+++ b/manifests/server/instance/late_initdb.pp
@@ -16,12 +16,9 @@
String[1] $user = $postgresql::server::user,
String[1] $group = $postgresql::server::group,
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
String[1] $module_workdir = $postgresql::server::module_workdir,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
# Set the defaults for the postgresql_psql resource
Postgresql_psql {
psql_user => $user,
diff --git a/manifests/server/instance/passwd.pp b/manifests/server/instance/passwd.pp
index 85ee0ce754..e832fb1978 100644
--- a/manifests/server/instance/passwd.pp
+++ b/manifests/server/instance/passwd.pp
@@ -17,14 +17,11 @@
String[1] $user = $postgresql::server::user,
String[1] $group = $postgresql::server::group,
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
String[1] $database = $postgresql::server::default_database,
String[1] $module_workdir = $postgresql::server::module_workdir,
Optional[Variant[String[1], Sensitive[String[1]], Integer]] $postgres_password = $postgresql::server::postgres_password,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
$real_postgres_password = if $postgres_password =~ Sensitive {
$postgres_password.unwrap
} else {
diff --git a/manifests/server/instance/service.pp b/manifests/server/instance/service.pp
index f690245e9b..af917308e8 100644
--- a/manifests/server/instance/service.pp
+++ b/manifests/server/instance/service.pp
@@ -25,14 +25,11 @@
Optional[String[1]] $service_provider = $postgresql::server::service_provider,
String[1] $service_status = $postgresql::server::service_status,
String[1] $user = $postgresql::server::user,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
String[1] $default_database = $postgresql::server::default_database,
Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path,
Hash $connect_settings = $postgresql::server::default_connect_settings,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
anchor { "postgresql::server::service::begin::${name}": }
if $service_manage {
diff --git a/manifests/server/instance/systemd.pp b/manifests/server/instance/systemd.pp
index ddda18cdf7..d3f217e09e 100644
--- a/manifests/server/instance/systemd.pp
+++ b/manifests/server/instance/systemd.pp
@@ -3,16 +3,12 @@
# @param drop_in_ensure sets the Systemd drop-in file to present or absent
# @api private
define postgresql::server::instance::systemd (
- Variant[String[1], Stdlib::Port] $port,
+ Stdlib::Port $port,
Stdlib::Absolutepath $datadir,
Optional[String[1]] $extra_systemd_config = undef,
String[1] $service_name = $name,
Enum[present, absent] $drop_in_ensure = 'present',
-
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
# Template uses:
# - $port
# - $datadir
diff --git a/manifests/server/reassign_owned_by.pp b/manifests/server/reassign_owned_by.pp
index 4c1aea6bf9..c0b15461fc 100644
--- a/manifests/server/reassign_owned_by.pp
+++ b/manifests/server/reassign_owned_by.pp
@@ -13,12 +13,9 @@
String $new_role,
String $db,
String $psql_user = $postgresql::server::user,
- Variant[String[1], Stdlib::Port] $port = $postgresql::server::port,
+ Stdlib::Port $port = $postgresql::server::port,
Hash $connect_settings = $postgresql::server::default_connect_settings,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
$sql_command = "REASSIGN OWNED BY \"${old_role}\" TO \"${new_role}\""
$group = $postgresql::server::group
@@ -27,7 +24,7 @@
#
# Port, order of precedence: $port parameter, $connect_settings[PGPORT], $postgresql::server::port
#
- if $port != undef {
+ if $port {
$port_override = $port
} elsif $connect_settings != undef and 'PGPORT' in $connect_settings {
$port_override = undef
diff --git a/manifests/server/role.pp b/manifests/server/role.pp
index cec244af6c..576a71abd9 100644
--- a/manifests/server/role.pp
+++ b/manifests/server/role.pp
@@ -29,7 +29,7 @@
Boolean $createdb = false,
Boolean $createrole = false,
String[1] $db = $postgresql::server::default_database,
- Optional[Variant[String[1], Stdlib::Port]] $port = undef,
+ Optional[Stdlib::Port] $port = undef,
Boolean $login = true,
Boolean $inherit = true,
Boolean $superuser = false,
@@ -45,9 +45,6 @@
Optional[Enum['md5', 'scram-sha-256']] $hash = undef,
Optional[Variant[String[1], Integer]] $salt = undef,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
$password_hash_unsensitive = if $password_hash =~ Sensitive[String] {
$password_hash.unwrap
} else {
diff --git a/manifests/server/table_grant.pp b/manifests/server/table_grant.pp
index cc623fe428..9168dd9ce0 100644
--- a/manifests/server/table_grant.pp
+++ b/manifests/server/table_grant.pp
@@ -19,15 +19,12 @@
String[1] $db,
String[1] $role,
Optional[Enum['present', 'absent']] $ensure = undef,
- Optional[Variant[String[1], Stdlib::Port]] $port = undef,
+ Optional[Stdlib::Port] $port = undef,
Optional[String[1]] $psql_db = undef,
Optional[String[1]] $psql_user = undef,
Optional[Hash] $connect_settings = undef,
Boolean $onlyif_exists = false,
) {
- if $port =~ String {
- deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
- }
postgresql::server::grant { "table:${name}":
ensure => $ensure,
role => $role,
diff --git a/templates/systemd-override.conf.epp b/templates/systemd-override.conf.epp
index 830c3007d5..48b02c72f4 100644
--- a/templates/systemd-override.conf.epp
+++ b/templates/systemd-override.conf.epp
@@ -1,5 +1,5 @@
<%- |
- Variant[String[1], Stdlib::Port] $port,
+ Stdlib::Port $port,
Stdlib::Absolutepath $datadir,
Optional[String[1]] $extra_systemd_config,
| -%>