From: Ian Barwick <ian.barwick@2ndquadrant.com>
To: Evan Walter <ewalter@decisionanalyst.com>
To: pgsql-admin@postgresql.org
Subject: Re: Trouble setting up Streaming Replication with Barman
Date: Fri, 22 Nov 2019 10:58:35 +0900
Message-ID: <0c2bc048-3487-35f3-6263-3b00efcc6745@2ndquadrant.com> (raw)
In-Reply-To: <CAOHVLOG2S3NzOftT=+XRBoyYtOY=2LSF+ije7wGD7TrntS3-Cw@mail.gmail.com>
References: <CAOHVLOG2S3NzOftT=+XRBoyYtOY=2LSF+ije7wGD7TrntS3-Cw@mail.gmail.com>
On 2019/11/22 7:07, Evan Walter wrote:
> Hello,
> I am trying to set up streaming replication with barman, going down the tutorial.
>
> When I run/ I get:
>
> $barman receive-wal --create-slot pg
>
> ERROR: Cannot connect to server 'pg'
>
> $cat /etc/barman.d/pg.conf
> [pg]
(...)
> streaming_conninfo = host=<my-pg-server-ipaddress-here> user=streaming_barman dbname=postgres
(...)
> $nano /etc/postgresql/12/main/pg_hba.conf
(...)
> host all streaming_barman <my-barman-ipaddress-here>/32 md5
The "streaming_barman" user should be a user with replication permissions
(if not already set, execute "ALTER USER streaming_barman REPLICATION")
and appropriate permission granted in "pg_hba.conf":
host replication streaming_barman <my-barman-ipaddress-here>/32 md5
> The Barman Server (logged in as barman): ###############################
> $psql -c 'SELECT version()' -U barman -h <my-ipaddress-here> postgres
Check the replication connection works with:
psql -c 'IDENTIFY_SYSTEM' 'host=<my-ipaddress-here> dbname=postgres user=streaming_barman replication=1'
Regards
Ian Barwick
--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ian.barwick@2ndquadrant.com, ewalter@decisionanalyst.com
Subject: Re: Trouble setting up Streaming Replication with Barman
In-Reply-To: <0c2bc048-3487-35f3-6263-3b00efcc6745@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox