Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2016-10-27 18:04:32 MSK [3687-1] FATAL: database system identifier differs between the primary and standby
- 2016-10-27 18:04:32 MSK [3687-2] DETAIL: The primary's identifier is 6300853119170962464, the standby's identifier is 6343126169967713718.
- 2016-10-27 18:04:32 MSK [3690-1] postgres@postgres PANIC: could not open critical system index 2671
- 2016-10-27 18:04:32 MSK [3621-22] LOG: received smart shutdown request
- 2016-10-27 18:04:32 MSK [3621-23] LOG: server process (PID 3690) was terminated by signal 6: Aborted
- 2016-10-27 18:04:32 MSK [3621-24] LOG: terminating any other active server processes
- 2016-10-27 18:04:33 MSK [3621-25] LOG: abnormal database system shutdown
- root@ProLiant-DL160-G6:/var/log/postgresql# psql
- 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"?
- CREATE USER replica
- SUPERUSER
- LOGIN
- CONNECTION LIMIT 1
- ENCRYPTED PASSWORD 'MyStrongPassword';
- Откройте этому пользователю доступ для реплицкации (pg_hba.conf):
- host replication replica 127.0.0.1/0 md5
- log_connections = on
- max_wal_senders = 1
- wal_mode = 'archive'
- archive_mode = on
- archive_command = 'cd .'
- wal_keep_segments = 10000 # e.g. 160 GB
- Сделайте бэкап (Средствами pg и rsync!)
- psql -c "select pg_start_backup('Start backup for slave-server')"
- rsync -cva --inplace --exclude=*pg_xlog*
- ${PGDATA}/ $secondnode:$PGDATA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement