Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Master: 10.0.0.1
- Slave1: 10.0.0.2
- Slave2: 10.0.0.3 (this is the new one I have created today)
- wal_level = hot_standby
- max_wal_senders = 3
- hot_standby = on
- standby_mode = on
- primary_conninfo = 'host=10.0.0.2 port=5432 user=repuser password=password'
- sudo -u postgres pg_basebackup -h 10.0.0.2 -D /var/lib/postgresql/9.2/data/ -U repuser -v -P --xlog-method=stream
- []# ps aux | grep postgres
- postgres: wal sender process repuser 10.0.0.3 (33476) streaming 3B21/21934000
- postgres=# select application_name, state, sync_priority, sync_state from pg_stat_replication;
- application_name | state | sync_priority | sync_state
- ------------------+-----------+---------------+------------
- walreceiver | streaming | 0 | async
- (1 row)
- []# ps aux | grep postgres
- 0:00 /usr/pgsql-9.2/bin/postmaster -p 5432 -D /var/lib/postgresql/9.2/data/
- 0:00 postgres: logger process
- 1:18 postgres: startup process recovering 0000000200003B22000000CF
- 0:00 postgres: checkpointer process
- 0:04 postgres: writer process
- 0:00 postgres: stats collector process
- 0:34 postgres: wal receiver process streaming 3B22/CF800000
- 0:00 grep postgres
- []# psql -U postgres
- psql: could not connect to server: No such file or directory
- Is the server running locally and accepting
- connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Add Comment
Please, Sign In to add comment