Skip to content

Commit

Permalink
Merge branch 'develop' into release/2022-02-18
Browse files Browse the repository at this point in the history
  • Loading branch information
drothery-edb committed Feb 18, 2022
2 parents 29142b1 + 1db8a2a commit af86af7
Showing 1 changed file with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,42 @@ host all all all md5
host replication streaming_barman all md5
```

### Database settings for streaming
### Enable remote access to your PostgreSQL Server

If the PostgreSQL server isn't already configured for remote access, or is restricted to connections from known machines, our database server won't be able to connect.

We'll also need to make sure there are replication slots available, and that PostgreSQL will allow another sender to connect. We'll use psql to check the current settings:
We'll use psql to check this setting:

```shell
psql -d pagila
```

The relevant configuration parameter is [`listen_addresses`](https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-LISTEN-ADDRESSES):

```sql
show listen_addresses;
__OUTPUT__
listen_addresses
------------------
*
(1 row)
```

The value for this server is `*` - which allows connections from anything. This doesn't need to be changed. If the value were to be empty, `localhost`, or a list of hosts or addresses that don't include our database server, we'd need to add its hostname (`backup`) to the list, or change it to the wildcard.

```sql
ALTER SYSTEM SET listen_addresses TO "*";
__OUTPUT__
ALTER SYSTEM
```

!!! Note
If you change this setting, you'll need to restart the database server for it to take effect. Since our setting was already allowing all remote connections, we don't need to do that.

### Database settings for streaming

We'll also need to make sure there are replication slots available, and that PostgreSQL will allow another sender to connect. We'll continue to use psql to check the current settings:

```sql
Show max_wal_senders;
Show max_replication_slots;
Expand Down

0 comments on commit af86af7

Please sign in to comment.