Estou usando o PostgreSQL 10 agora. Instalou o mais novo Barman no RHEL 7.
Quando executo este comando pelo usuário barman:
-bash-4.2$ barman receive-wal pg
Starting receive-wal for server pg
ERROR: ArchiverFailure:pg_receivexlog not present in $PATH
Introdução oficial
WAL streaming
Barman can reduce the Recovery Point Objective (RPO) by allowing users to add continuous WAL streaming from a PostgreSQL server, on top of the standard archive_command strategy.
Barman relies on pg_receivewal, a utility that has been available from PostgreSQL 9.2 which exploits the native streaming replication protocol and continuously receives transaction logs from a PostgreSQL server (master or standby). Prior to PostgreSQL 10, pg_receivewal was named pg_receivexlog.
IMPORTANT: Barman requires that pg_receivewal is installed on the same server. For PostgreSQL 9.2 servers, you need pg_receivexlog of version 9.2 installed alongside Barman. For PostgreSQL 9.3 and above, it is recommended to install the latest available version of pg_receivewal, as it is back compatible. Otherwise, users can install multiple versions of pg_receivewal/pg_receivexlog on the Barman server and properly point to the specific version for a server, using the path_prefix option in the configuration file.
In order to enable streaming of transaction logs, you need to:
setup a streaming connection as previously described
set the streaming_archiver option to on
The cron command, if the aforementioned requirements are met, transparently manages log streaming through the execution of the receive-wal command. This is the recommended scenario.
However, users can manually execute the receive-wal command:
barman receive-wal <server_name>
Ele disse:
Prior to PostgreSQL 10, pg_receivewal was named pg_receivexlog.
Por que é a versão 10, tem pg_receivexlog
erro?
Verificar backup
Quando eu verifico o backup, tenho:
-bash-4.2$ barman check pg
Server pg:
WAL archive: FAILED (please make sure WAL shipping is setup)
PostgreSQL: OK
is_superuser: OK
PostgreSQL streaming: OK
wal_level: OK
replication slot: FAILED (slot 'barman' not initialised: is 'receive-wal' running?)
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
systemid coherence: OK (no system Id stored on disk)
pg_receivexlog: FAILED
pg_receivexlog compatible: FAILED (PostgreSQL version: 10.12, pg_receivexlog version: None)
receive-wal running: FAILED (See the Barman log file for more details)
archiver errors: OK
Como corrigir os itens com falha?
Editar
Quando eu verifico pg_receivewal
por postgres
usuário:
$ sudo su - postgres
-bash-4.2$ pg_receivewal
-bash: pg_receivewal: command not found
-bash-4.2$ psql
psql (9.2.24, server 10.12)
WARNING: psql version 9.2, server version 10.0.
Some psql features might not work.
Type "help" for help.
Versão do PostgreSQL: 10.12, pg_receivewal
não existe?
Quando
pg_receivexlog
foi renomeado, o barman não adicionou mensagens de erro condicional de dispersão em todo o seu código. Ele está procurando porpg_receivewal
, mas o texto da mensagem de erro ainda diz "pg_receivexlog" como um termo abrangente para cobrir o que for aplicável.A solução é adicionar o diretório que contém
pg_receivewal
o seu $PATH. Já deveria estar lá, mas aparentemente não está. Como você instalou o PostgreSQL e o barman? Com qual usuário do sistema operacional você está executando este comando?Definir
export PATH=$PATH:/usr/pgsql-10/bin/
sobpostgres
ebarman
usuários.