Postgres Replication was working fine with Postgresql version 9.5. when the template of a DB with 10gb of data was created and then the slave server stopped. Its Postgres service is not starting now. Can you suggest how to reconfigure the replication? I had tried to reinstall and did the same procedure of replication but the service was not running after copying the data folder from the master server except the conf files. These are the steps I followed: In Master:-
*C:\Programfiles\PostgreSql\9.5\data\postgresql.conf
Modifications:
listen_addresses = '*'
wal_level = hot_standby
max_wal_senders = 1
wal_keep_segments = 5
* C:\Programfiles\PostgreSql\9.5\data\pg_hba.conf
Add:
host replication postgres x.x.x.x/32 trust
In Slave:
'*C:\Programfiles\PostgreSql\9.5\data\postgresql.conf'
'hot_standby = on'
Then create a file called recovery.conf under the path
‘C:\Programfiles\PostgreSql\9.5\data\’ and add:'
'standby_mode = 'on'
'primary_conninfo = 'host=x.x.x.x port=5432 user=postgres'
'password=*****''
'trigger_file = 'E:\replication\trigger.txt'
In Master: Start the Postgresql Service. Open Sql Shell(psql) type the command
select pg_start_backup('base backup');
Then copy all the contents of data directory excluding postmaster.pid, and all configuration files(.conf) to Slave system’s data directory Now type the command
select pg_stop_backup();
Kindly suggest a method to resume this replication.
This is the error log
2018-07-30 15:26:57 +04 FATAL: the database system is starting up
2018-07-30 15:26:57 +04 LOG: database system was interrupted while in
recovery at log time 2018-07-07 12:21:38 +04
2018-07-30 15:26:57 +04 HINT: If this has occurred more than once some data
might be corrupted and you might need to choose an earlier recovery target.
2018-07-30 15:26:58 +04 FATAL: the database system is starting up
2018-07-30 15:26:59 +04 FATAL: the database system is starting up
2018-07-30 15:27:00 +04 FATAL: the database system is starting up
2018-07-30 15:27:00 +04 LOG: entering standby mode
2018-07-30 15:27:00 +04 LOG: redo starts at 6F/5B387B70
2018-07-30 15:27:01 +04 LOG: consistent recovery state reached at
6F/5BD384F0
2018-07-30 15:27:01 +04 WARNING: page 4 of relation base/16394/27254 does
not exist
2018-07-30 15:27:01 +04 CONTEXT: xlog redo Heap2/VISIBLE: cutoff xid 0
2018-07-30 15:27:01 +04 PANIC: WAL contains references to invalid pages
2018-07-30 15:27:01 +04 CONTEXT: xlog redo Heap2/VISIBLE: cutoff xid 0
2018-07-30 15:27:01 +04 LOG: database system is ready to accept read only
connections
2018-07-30 15:27:01 +04 FATAL: role "WIN-6QQN9PM6AUG$" does not exist
2018-07-30 15:27:01 +04 LOG: startup process (PID 2808) was terminated by
exception 0xC0000409
2018-07-30 15:27:01 +04 HINT: See C include file "ntstatus.h" for a
description of the hexadecimal value.
2018-07-30 15:27:01 +04 LOG: terminating any other active server processes
User contributions licensed under CC BY-SA 3.0