Skip to content

Commit

Permalink
Merge pull request #1610 from ekohl/improve-readme
Browse files Browse the repository at this point in the history
Document how to select a version as its own chapter
  • Loading branch information
bastelfreak authored Aug 29, 2024
2 parents 0c66889 + 231e008 commit 05a7809
Showing 1 changed file with 39 additions and 15 deletions.
54 changes: 39 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,50 @@ If you get an error message from these commands, your permission settings restri

For more details about server configuration parameters, consult the [PostgreSQL Runtime Configuration documentation](http://www.postgresql.org/docs/current/static/runtime-config.html).

#### Selecting a version

The version is intended to be supplied via `postgresql::globals`.
By default the module tries to derive the version based on the OS facts, but can be overridden.
This is typically used with the official postgresql.org packages:

```puppet
class { 'postgresql::globals':
manage_package_repo => true,
version => '16',
}
include postgresql::server
```

On EL 8 & 9 you can also use DNF modules:

```puppet
class { 'postgresql::globals':
manage_dnf_module => true,
version => '16',
}
include postgresql::server
```

If you manage the repositories yourself, overriding the version is sufficient.

```puppet
class { 'postgresql::globals':
version => '16',
}
include postgresql::server
```

### Configure an instance

This module supports managing multiple instances (the default instance is referred to as 'main' and managed via including the server.pp class)

**NOTE:** This feature is currently tested on Centos 8 Streams/RHEL8 with DNF Modules enabled. Different Linux plattforms and/or the Postgresql.org
packages distribute different Systemd service files or use wrapper scripts with Systemd to start Postgres. Additional adjustmentments are needed to get this working on these plattforms.
**NOTE:** This feature is currently tested on CentOS 8 Streams/RHEL8 with DNF Modules enabled. Different Linux platforms and/or the postgresql.org
packages distribute different systemd service files or use wrapper scripts with systemd to start PostgreSQL. Additional adjustmentments are needed to get this working on these platforms.

#### Working Plattforms
#### Working Platforms

* Centos 8 Streams
* RHEL 8
Expand Down Expand Up @@ -341,18 +377,6 @@ class { 'postgresql::server':
}
```

To use a specific version of the PostgreSQL package:

```puppet
class { 'postgresql::globals':
manage_package_repo => true,
version => '9.2',
}
class { 'postgresql::server':
}
```

### Manage remote users, roles, and permissions

Remote SQL objects are managed using the same Puppet resources as local SQL objects, along with a `$connect_settings` hash. This provides control over how Puppet connects to the remote Postgres instances and which version is used for generating SQL commands.
Expand Down

0 comments on commit 05a7809

Please sign in to comment.