Postgresql 9.0 streaming replication - processes not starting
I have followed the postgresql wiki binary replication tutorial and cannot get the wal_sender and wal_receiver processes to start on the master or slave server. I'm not seeing any relevant information in the log files to help. I'm able to connect via psql from my slave to my master server, so I'm relatively certain the connection configuration for SR has been setup correctly. Any开发者_运维技巧 pointers or tips on setting up SR without log shipping would be wonderful.
Assuming you have PG installed and everything the settings are:
On Master:
- add to postgres.conf wal_level = hot_standby and max_wal_senders = 5 settings
- add to pb_hba.conf host replication [insert uname] [insert slave ip]/32 trust
On Slave:
- create recovery.conf file and add standby_mode = 'on' and primary_conninfo = 'host=localhost port=5432 user=eggie5 password=asdf'
Create baseline:
This is the hard part. You need to get a "snapshot" of the master data (directory) and get to to the slave so they start in synch. You can do this any number of ways: see this page for simple instructions: http://eggie5.com/15-setting-up-pg9-streaming-replication
I had the same problem. I traced the problem back to having used the Postgres-9.0 package that Martin Pitt provides (which I have used since Ubuntu 10.10 doesn't have Postgres-9* in it's package repository yet). I'm guessing that he didn't build the package with streaming replication support.
I have then downloaded and installed the binary package that PostgreSQL provides and the streaming replication started to work smoothly.
精彩评论