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
@@ -246,6 +247,9 @@ Path to your `pg\_ident.conf` file.
246
247
####`postgresql_conf_path`
247
248
Path to your `postgresql.conf` file.
248
249
250
+
####`recovery_conf_path`
251
+
Path to your `recovery.conf` file.
252
+
249
253
####`pg_hba_conf_defaults`
250
254
If false, disables the defaults supplied with the module for `pg\_hba.conf`. This is useful if you disagree with the defaults and wish to override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform basic `psql` operations for example.
251
255
@@ -365,6 +369,9 @@ Path to your `pg\_ident.conf` file.
365
369
####`postgresql_conf_path`
366
370
Path to your `postgresql.conf` file.
367
371
372
+
####`recovery_conf_path`
373
+
Path to your `recovery.conf` file.
374
+
368
375
####`pg_hba_conf_defaults`
369
376
If false, disables the defaults supplied with the module for `pg\_hba.conf`. This is useful if you di
370
377
sagree with the defaults and wish to override them yourself. Be sure that your changes of course alig
@@ -396,6 +403,9 @@ This value defaults to `true`. Whether or not manage the pg_hba.conf. If set to
396
403
####`manage_pg_ident_conf`
397
404
This value defaults to `true`. Whether or not manage the pg_ident.conf. If set to `true`, puppet will overwrite this file. If set to `false`, puppet will not modify the file.
398
405
406
+
####`manage_recovery_conf`
407
+
This value defaults to `false`. Whether or not manage the recovery.conf. If set to `true`, puppet will overwrite this file. If set to `false`, puppet will not create the file.
408
+
399
409
###Class: postgresql::client
400
410
401
411
This class installs postgresql client software. Alter the following parameters if you have a custom version you would like to install (Note: don't forget to make sure to add any necessary yum or apt repositories if specifying a custom version):
@@ -696,6 +706,65 @@ An order for placing the mapping in pg_ident.conf. Defaults to 150.
696
706
####`target`
697
707
This provides the target for the rule, and is generally an internal only property. Use with caution.
698
708
709
+
###Resource: postgresql::server::recovery
710
+
This defined type allows you to create the content for `recovery.conf`. For more details see the [PostgreSQL documentation](http://www.postgresql.org/docs/9.4/static/recovery-config.html).
711
+
712
+
For example:
713
+
714
+
postgresql::server::recovery( 'Create a recovery.conf file with the following defined parameters':
Only the specified parameters will be recognize in the template! The `recovery.conf` will be only create if at least one parameter set and [manage_recovery_conf](#manage_recovery_conf) set to true.
747
+
748
+
Every param value is a String set in the template with inverted comma except `recovery_target_inclusive`, `pause_at_recovery_target`, `standby_mode` and `recovery_min_apply_delay`.
749
+
`standby_mode` is special, String ('on'/'off') and Boolean (true/false) is allowed, but the postgres documentation says it's a Boolean.
750
+
751
+
A detailed description of all above listed parameters can be found in the [PostgreSQL documentation](http://www.postgresql.org/docs/9.4/static/recovery-config.html).
752
+
753
+
The parameters are grouped into these three sections:
In this section the `recovery_target_name`, `recovery_target_time`, `recovery_target_xid`, `recovery_target_inclusive`, `recovery_target`, `recovery_target_timeline` and `pause_at_recovery_target` parameters are listed.
761
+
762
+
#### [`Standby Server Settings`](http://www.postgresql.org/docs/9.4/static/standby-settings.html)
763
+
In this section the `standby_mode`, `primary_conninfo`, `primary_slot_name`, `trigger_file` and `recovery_min_apply_delay` parameters are listed.
764
+
765
+
####`target`
766
+
This provides the target for the rule, and is generally an internal only property. Use with caution.
767
+
699
768
700
769
###Resource: postgresql::server::role
701
770
This resource creates a role or user in PostgreSQL.
fail('postgresql::server::manage_recovery_conf has been disabled, so this resource is now unused and redundant, either enable that option or remove this resource from your manifests')
23
+
} else {
24
+
if($restore_command == undef and $archive_cleanup_command == undef and $recovery_end_command == undef
25
+
and $recovery_target_name == undef and $recovery_target_time == undef and $recovery_target_xid == undef
26
+
and $recovery_target_inclusive == undef and $recovery_target == undef and $recovery_target_timeline == undef
27
+
and $pause_at_recovery_target == undef and $standby_mode == undef and $primary_conninfo == undef
28
+
and $primary_slot_name == undef and $trigger_file == undef and $recovery_min_apply_delay == undef) {
29
+
fail('postgresql::server::recovery use this resource but do not pass a parameter will avoid creating the recovery.conf, because it makes no sense.')
0 commit comments