Jota eu faço o sequinte procedimento:

-- Altera as configurações do postgresql.conf do Master
wal_level = hot_standby
archive_mode = on
archive_command = 'cp -i %p $HOME/bin/postgres/archive/%f'
max_wal_senders = 15
synchronous_commit = on
-- Cria o user replicator no master
psql -U postgres
create user replicator with superuser password '**';

-- Altera as configurações do pg_hba.conf do Master
host replication postgres <ipdo stanby>/32 trust
host replication replicator <ipdo stanby>/32 trust
host all  replicator xx.x.xx.xx/32 md5

-- Faz o backpbase a partir do standby conectando no master
pg_basebackup -U postgres -h xx.x.xx.xx -D /data/9.1

-- Altera as Configurações do Standby postgresql.conf
hot_standby = on
port = 5432
-- Criar o arquivo recovery.conf
standby_mode = on
primary_conninfo = 'host=xx.x.xx.xx port=5432 application_name=slave1'
trigger_file = '/tmp/arquivo_gatilho.pgsql'

- Iniciar o servidor standby

-- 
Antonio Abner Junior - AJ
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a