Guest User

Untitled

a guest
Mar 19th, 2018
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. Master: 10.0.0.1
  2. Slave1: 10.0.0.2
  3. Slave2: 10.0.0.3 (this is the new one I have created today)
  4.  
  5. wal_level = hot_standby
  6. max_wal_senders = 3
  7.  
  8. hot_standby = on
  9.  
  10. standby_mode = on
  11. primary_conninfo = 'host=10.0.0.2 port=5432 user=repuser password=password'
  12.  
  13. sudo -u postgres pg_basebackup -h 10.0.0.2 -D /var/lib/postgresql/9.2/data/ -U repuser -v -P --xlog-method=stream
  14.  
  15. []# ps aux | grep postgres
  16. postgres: wal sender process repuser 10.0.0.3 (33476) streaming 3B21/21934000
  17.  
  18.  
  19. postgres=# select application_name, state, sync_priority, sync_state from pg_stat_replication;
  20. application_name | state | sync_priority | sync_state
  21. ------------------+-----------+---------------+------------
  22. walreceiver | streaming | 0 | async
  23. (1 row)
  24.  
  25. []# ps aux | grep postgres
  26. 0:00 /usr/pgsql-9.2/bin/postmaster -p 5432 -D /var/lib/postgresql/9.2/data/
  27. 0:00 postgres: logger process
  28. 1:18 postgres: startup process recovering 0000000200003B22000000CF
  29. 0:00 postgres: checkpointer process
  30. 0:04 postgres: writer process
  31. 0:00 postgres: stats collector process
  32. 0:34 postgres: wal receiver process streaming 3B22/CF800000
  33. 0:00 grep postgres
  34.  
  35. []# psql -U postgres
  36. psql: could not connect to server: No such file or directory
  37. Is the server running locally and accepting
  38. connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Add Comment
Please, Sign In to add comment