Skip to content

Commit

Permalink
Update instructions
Browse files Browse the repository at this point in the history
Since version 10, we don't need to adjust parameters. Also, pg_hba.conf
changes its behavior. It matches normal connections instead of
(physical) replication connections.
  • Loading branch information
Euler Taveira committed Aug 6, 2019
1 parent 5b25709 commit fc4c2af
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ max_replication_slots = 1

After changing these parameters, a restart is needed.

By default, PostgreSQL 10 or later doesn't need to adjust parameters.

Parameters
----------

Expand Down Expand Up @@ -87,14 +89,20 @@ There are two ways to obtain the changes (JSON objects) from **wal2json** plugin
pg_recvlogical
--------------

Besides the configuration above, it is necessary to configure a replication connection to use pg_recvlogical.
Besides the configuration above, it is necessary to configure a replication connection to use pg_recvlogical. A logical replication connection in version 9.4, 9.5, and 9.6 requires `replication` keyword in the database column. Since version 10, logical replication matches a normal entry with a database name or keywords such as `all`.

First, add a replication connection rule at pg_hba.conf:
First, add a replication connection rule at pg_hba.conf (9.4, 9.5, and 9.6):

```
local replication myuser trust
```

If you are using version 10 or later:

```
local mydatabase myuser trust
```

Also, set max_wal_senders at postgresql.conf:

```
Expand Down

0 comments on commit fc4c2af

Please sign in to comment.