From: | Owen Marinas <owen(dot)marinas(at)featureset(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | replication problems 9.0 |
Date: | 2011-06-07 18:05:21 |
Message-ID: | 4DEE6861.1040808@featureset.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I configured replication in 2 AWS instances.
I have shell scripts to dynamically configure the Ips after the
instances are UP.
the Postgres versions are the same in master& slave, also the
architecture of instances.
Added the lines in the Master
root(at)ip-172-19-1-37:~# cat /etc/postgresql/9.0/main/pg_hba.conf |grep trust
host all postgres 172.19.1.101/32 trust
root(at)ip-172-19-1-37:~# tail -n6 /etc/postgresql/9.0/main/postgresql.conf
wal_level = hot_standby
max_wal_senders = 5
wal_keep_segments = 32
archive_mode = on
archive_command = 'cp %p /nfsdata/postgres_wal/main_cware/%f'
And in the slave
root(at)ip-172-19-1-101:~# cat /var/lib/postgresql/9.0/main/recovery.conf
standby_mode = 'on'
trigger_file = '/path_to/trigger'
restore_command = 'cp /nfsdata/postgres_wal/main_cware/%f "%p"'
primary_conninfo = 'host=172.19.1.37 port=5432 user=postgres'
root(at)ip-172-19-1-101:~# cat /etc/postgresql/9.0/main/postgresql.conf
|grep hot
hot_standby = on
----------------------------
I have in the master log
2011-06-07 17:53:04 UTC FATAL: no pg_hba.conf entry for replication
connection from host "172.19.1.101", user "postgres", SSL off
2011-06-07 17:53:09 UTC FATAL: no pg_hba.conf entry for replication
connection from host "172.19.1.101", user "postgres", SSL off
and in the slave
cp: cannot stat
`/nfsdata/postgres_wal/main_cware/00000001000000000000002E': No such
file or directory
2011-06-07 17:53:34 UTC FATAL: could not connect to the primary server:
FATAL: no pg_hba.conf entry for replication connection from host
"172.19.1.101", user "postgres", SSL off
__________________________________
I'm rsync the files from master
rsync -a --delete --exclude postmaster.pid --exclude pg_xlog
/data/postgresql/main/ /nfsdata/postgres_wal/main_cware/bkp/
and restoring the DB in slave
rsync -a --exclude '.conf' /nfsdata/postgres_wal/main_cware/bkp/
/var/lib/postgresql/9.0/main
replication is not working since the records added to te master car not
present in the slave.
Any help will be appreciated.
regards
Owen
From | Date | Subject | |
---|---|---|---|
Next Message | Rhys A.D. Stewart | 2011-06-07 18:26:32 | index issues with generate_series.....or why this index os not working |
Previous Message | Owen Marinas | 2011-06-07 18:04:03 | replication problems |