PostgreSQL V13 Replication Issue

From: Haseeb Khan <khanhaseeb92(at)gmail(dot)com>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: PostgreSQL V13 Replication Issue
Date: 2021-06-16 16:25:37
Message-ID: CAC6p5nctRCp73Hb8upQY4m6qNcv=wh7dPXkR+J3=mUEo1qwOaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hello Everyone,

Apologies in advance I don't know where to get knowledge regarding this
issue that's why I posted here, Highly appreciated if someone could help on
this regard

We have installed and configured PostgreSQL V13 Master- Slave streaming
replication on Windows server 2016 but replication is not working. I don't
know where the error is because we are not facing any error regarding
replication and replication also not working.

Below are the Configuration steps performed on Master and Slave Server

*Master Server postgresql.conf file changes made*

listen_addresses = '*'

wal_level = replica

wal_writer_delay = 500ms

archive_mode = on

archive_command ='copy %p \\server IP\wal_archive\%f"'

archive_timeout = 3600

max_wal_senders = 6

max_replication_slots = 6

*pg_hba Master Server File*

host replication username slave_ip/32 md5

host replication username master_ip/32 md5

*Below are the Configuration steps performed on Slave Server*

*Note:* I have copied Data directory from master server and paste it on
Slave server

*Slave Server postgresql.conf file changes made*

listen_addresses = '*'

wal_level = replica

wal_writer_delay = 500ms

#archive_mode = off

max_wal_senders = 6

hot_standby = on

*Slave pg_hba.conf file*

host replication username slave_ip/32 md5

host replication username master_ip/32 md5

*recovery.conf file*

standby_mode = 'on'

restore_command= 'copy "C:\wal_archive\%f" %p'

<primary_conninfo> = 'host=<MasterIP> port=5432 user=replicator
password=*****'

After all these changes made when I restart the master and slave server and
run the following command on master server to check whether replication is
working or not the below mention query return 0 row

*Master Server* select * from pg_stat_replication" (return 0 row)

Would be highly appreciated, if someone could tell me what exactly the
issue is or what I am missing in the configuration on both the servers
(master- slave).Why replication is not working?

*BR,*
Haseeb Ahmad

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Dean Gibson (DB Administrator) 2021-06-16 16:30:24 Re: PostgreSQL V13 Replication Issue
Previous Message Vijaykumar Jain 2021-06-15 17:22:23 Re: waiting for client write