From: Stephen Frost <sfrost@snowman.net>
To: AYahorau@ibagroup.eu
Cc: pgsql-admin@postgresql.org
Cc: MikalaiKeida@ibagroup.eu
Subject: Re: pg_basebackup fails: could not receive data from WAL stream: server closed the connection unexpectedly
Date: Tue, 4 Dec 2018 09:01:20 -0500
Message-ID: <20181204140119.GN3415@tamriel.snowman.net> (raw)
In-Reply-To: <OF54569A25.1AF98674-ON43258358.002D80F2-43258358.00304DB9@iba.by>
References: <OF54569A25.1AF98674-ON43258358.002D80F2-43258358.00304DB9@iba.by>
Greetings,
* AYahorau@ibagroup.eu (AYahorau@ibagroup.eu) wrote:
> Not so long ago I faced the problem of database synchronization using
> pg_basebackup utility on linux SLES 12 machine using PostgreSQL 10.4:
>
> pg_basebackup -h host01 -U dbuser -D /var/PostgresDb -w
> LOG: standby "pg_basebackup" is now a synchronous standby with priority 1
> pg_basebackup: could not receive data from WAL stream: server closed the
> connection unexpectedly
> This probably means the server terminated abnormally
> before or while processing the request.
> pg_basebackup: child process exited with error 1
> pg_basebackup: removing contents of data directory "/var/RtpPostgresDb"
>
>
> PostgreSQL log of master server contain the following error entry:
> terminating walsender process due to replication timeout
>
> Currently my configuration is the following:
> wal_sender_timeout = 1s
> wal_receiver_timeout = 1s
> wal_receiver_status_interval = 10s
pg_basebackup has a status-interval option (called statusint in older
versions). Have you tried setting that option...?
Also, seems like you'd really need to also be running pg_receivewal...
At some point the pg_basebackup will end and disconnect. Or you could
run a replica instead of using pg_basebackup/pg_receivewal and then
take regular backups and archive your WAL with something like
pgbackrest.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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: sfrost@snowman.net, AYahorau@ibagroup.eu, MikalaiKeida@ibagroup.eu
Subject: Re: pg_basebackup fails: could not receive data from WAL stream: server closed the connection unexpectedly
In-Reply-To: <20181204140119.GN3415@tamriel.snowman.net>
* 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