Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. 2016-10-27 18:04:32 MSK [3687-1] FATAL: database system identifier differs between the primary and standby
  2. 2016-10-27 18:04:32 MSK [3687-2] DETAIL: The primary's identifier is 6300853119170962464, the standby's identifier is 6343126169967713718.
  3. 2016-10-27 18:04:32 MSK [3690-1] postgres@postgres PANIC: could not open critical system index 2671
  4. 2016-10-27 18:04:32 MSK [3621-22] LOG: received smart shutdown request
  5. 2016-10-27 18:04:32 MSK [3621-23] LOG: server process (PID 3690) was terminated by signal 6: Aborted
  6. 2016-10-27 18:04:32 MSK [3621-24] LOG: terminating any other active server processes
  7. 2016-10-27 18:04:33 MSK [3621-25] LOG: abnormal database system shutdown
  8.  
  9. root@ProLiant-DL160-G6:/var/log/postgresql# psql
  10. psql: could not connect to server: No such file or directory
  11. Is the server running locally and accepting
  12. connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
  13.  
  14. CREATE USER replica
  15. SUPERUSER
  16. LOGIN
  17. CONNECTION LIMIT 1
  18. ENCRYPTED PASSWORD 'MyStrongPassword';
  19.  
  20. Откройте этому пользователю доступ для реплицкации (pg_hba.conf):
  21.  
  22. host replication replica 127.0.0.1/0 md5
  23.  
  24. log_connections = on
  25.  
  26. max_wal_senders = 1
  27. wal_mode = 'archive'
  28. archive_mode = on
  29. archive_command = 'cd .'
  30.  
  31. wal_keep_segments = 10000 # e.g. 160 GB
  32.  
  33. Сделайте бэкап (Средствами pg и rsync!)
  34.  
  35. psql -c "select pg_start_backup('Start backup for slave-server')"
  36.  
  37. rsync -cva --inplace --exclude=*pg_xlog*
  38. ${PGDATA}/ $secondnode:$PGDATA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement