Menu

#87 barman don't get WAL segment in WAL streaming mode

2.x
open
nobody
None
2017-05-24
2017-05-24
No

Hello!
I have postgresql 9.6 and barman 2.1 configured for WAL streaming. If I check backup settings I see error "WAL archive: FAILED (please make sure WAL shipping is setup)"

[root@labs-barman ~]# barman check labs-postgresql-1
Server labs-postgresql-1:
WAL archive: FAILED (please make sure WAL shipping is setup)
PostgreSQL: OK
superuser: OK
PostgreSQL streaming: OK
wal_level: OK
replication slot: OK
directories: OK
retention policy settings: OK
backup maximum age: OK (no last_backup_maximum_age provided)
compression settings: OK
failed backups: OK (there are 0 failed backups)
minimum redundancy requirements: OK (have 0 backups, expected at least 0)
pg_basebackup: OK
pg_basebackup compatible: OK
pg_basebackup supports tablespaces mapping: OK
pg_receivexlog: OK
pg_receivexlog compatible: OK
receive-wal running: OK
archiver errors: OK

This my barman configs:

[root@labs-barman ~]# cat /etc/barman.conf |grep -v \;

[barman]
barman_user = barman
configuration_files_directory = /etc/barman.d
barman_home = /var/lib/barman
log_file = /var/log/barman/barman.log
log_level = INFO
compression = gzip
retention_policy = RECOVERY WINDOW OF 7 DAYS

[root@labs-barman ~]# cat /etc/barman.d/labs-postgresql-1.conf |grep -v \;

[labs-postgresql-1]
description = "Example of PostgreSQL Database (Streaming-Only)"
conninfo = host=172.29.150.73 user=postgres dbname=postgres
streaming_conninfo = host=172.29.150.73 user=streaming_barman
backup_method = postgres
streaming_backup_name = barman_streaming_backup
streaming_archiver = on
slot_name = backup
streaming_archiver_name = barman_receive_wal
path_prefix = "/usr/pgsql-9.6/bin"

On postgresql server in pg_stat_replication i see this:

postgres=# select usename,application_name,state,sent_location,write_location,flush_location,replay_location,sync_state from pg_stat_replication;
usename | application_name | state | sent_location | write_location | flush_location | replay_location | sync_state
------------------+--------------------+-----------+---------------+----------------+----------------+-----------------+------------
postgres | walreceiver | streaming | 0/10000808 | 0/10000808 | 0/10000808 | 0/10000808 | async
streaming_barman | barman_receive_wal | streaming | 0/10000808 | 0/10000808 | 0/10000000 | | async
(2 rows)

barman trying to get first WAL segment, but another postgres server (replica) successfully received all WAL segments

What is the cause of the problem?

Discussion


Log in to post a comment.

MongoDB Logo MongoDB