Settings in master server:
Settings in slave server:
in recovery.conf file:
log_connections=on is set up on both master and slave server
entry is made for replication user in pg_hba.conf file in master server
when trying to replicate i get the following error
What do these lines mean?
when I run this command
I get the following error in startup.log file
Extend the question
We are new to Postgresql open source. We couldn’t understand the answer to this question. Please if possible explain briefly. We have followed the instructions from the book 'Postgresql 9 Administration Cook book'. We followed these steps from this book.
Carry out the following steps:
Identify your Master and Standby nodes, and ensure that they have been configured according to the best practice recipe.
Configure replication security. Create or confirm the existence of the replication user on Master node
Allow the replication user to authenticate. The following example allows access from any ip address using encrypted password authentication; you may wish to consider more restrictive options. Add the following line:
Set logging options in postgresql.conf on both Master and Standby, so that you get increased information regarding replication connection attempts and associated failures.
Set max_wal_senders on Master in postgresql.conf, or increment if the value is already non-zero.
Adjust wal_keep_segments on Master in postgresql.conf. Set this to a value no higher than the amount of freespace on the drive on which the pg_xlog directory is mounted, divided by 16MB. If pg_xlog isn't mounted on a separate drive, then don't assume all of the current freespace is available for transaction log files.
Adjust hot Standby parameters if required (see later recipe)
Take a base backup, very similar to the process for taking a physical backup as described in the backup chapter.
a. Start the backup
b. Copy the data files (excluding the pg_xlog directory)
c. Stop the backup
Set the recovery.conf parameters on the Standby. Note that the primary_ conninfo must not specify a database name, though can contain any other PostgreSQL connection option. Note also that all options in recovery.conf are enclosed in quotes, whereas postgresql.conf parameters need not be.
Start Standby server
Carefully monitor replication delay until the catchup period is over. During the initial catchup period, the replication delay will be much higher than we would normally expect it to be. You are advised to set hot_Standby = off for the initial period only.