From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: franz@kalibrr.com
Subject: BUG #15073: Bad error message for when pg_basebackup fails due to incorrect wal_level
Date: Mon, 19 Feb 2018 02:23:10 +0000
Message-ID: <151900699070.1391.5862985411054912618@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 15073
Logged by: Franz Beltran
Email address: franz@kalibrr.com
PostgreSQL version: 9.6.6
Operating system: Linux
Description:
Hi,
I was trying to perform a repmgr standby clone but it gets stuck on
pg_basebackup:
$ /usr/bin/repmgr -h <primary_DB_server_IP> -D /var/lib/postgresql/9.6/main
-d repmgr -U repmgr --upstream-node-id=<primary_DB_node_ID> -f
/etc/postgresql/9.6/main/repmgr.conf standby clone -v --log-level DEBUG
NOTICE: using provided configuration file
"/etc/postgresql/9.6/main/repmgr.conf"
NOTICE: destination directory "/var/lib/postgresql/9.6/main" provided
...
...
...
HINT: this may take some time; consider using the -c/--fast-checkpoint
option
INFO: executing:
pg_basebackup -l "repmgr base backup" -D /var/lib/postgresql/9.6/main -h
<primary_DB_server_IP> -p <primary_DB_server_port> -U repmgr -X stream
Upon checking the logs on the upstream server, the following error is
encountered:
user=repmgr,db=[unknown],app=pg_basebackup,client=<standby_IP>LOG: could
not send data to client: Broken pipe
user=repmgr,db=[unknown],app=pg_basebackup,client=<standby_IP>ERROR: base
backup could not send data, aborting backup
user=repmgr,db=[unknown],app=pg_basebackup,client=<standby_IP>FATAL:
connection to client lost
After some tinkering, we found that updating the following line in the
primary's postgresql.conf from:
wal_level = archive
to:
wal_level = hot_standby
resolves the issue.
It just seems like a bad user experience and a more meaningful error message
would've helped.
Thanks!
--
Franz Beltran
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, franz@kalibrr.com
Subject: Re: BUG #15073: Bad error message for when pg_basebackup fails due to incorrect wal_level
In-Reply-To: <151900699070.1391.5862985411054912618@wrigleys.postgresql.org>
References: <151900699070.1391.5862985411054912618@wrigleys.postgresql.org>
* 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