Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to select a version as its own chapter #1610

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading