Streaming Replication

From: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Streaming Replication
Date: 2019-04-22 09:53:57
Message-ID: BL0PR01MB5187E4CE61AD378FA3609E779B220@BL0PR01MB5187.prod.exchangelabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Team,

I am setting a streaming replication by using two different host there is no output of select * from pg_stat_replication; I have set the parameters on both side.

Host names are :

(10.29.15.244)
(10.29.15.25)

postgres=# select * from pg_stat_replication;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state | sent_lsn | write_lsn | flush_lsn | replay_lsn | write_lag | flush_lag | replay_lag | sync_priority | sync_state
-----+----------+---------+------------------+-------------+-----------------+-------------+---------------+--------------+-------+----------+-----------+-----------+------------+-----------+-----------+------------+---------------+------------
(0 rows)

bash-4.4$ ps aux | grep 'postgres.*rec'
121 postgres 0:00 grep postgres.*rec
bash-4.4$

Parameters on primary are:
-----------------------------
wal_level = hot_standby
max_wal_senders = 50
wal_keep_segments = 16
max_replication_slots = 16
vacuum_defer_cleanup_age = 4

Parameters on Standby are:
----------------------------------
max_standby_archive_delay = 30s
max_standby_streaming_delay = 30s
archive_mode = on
archive_timeout = 1800
hot_standby = on

Recovery.conf @ standby:

standby_mode = on
primary_conninfo = 'host=primary host port=5432 user=replication password=replication'
trigger_file = '/tmp/touch_me_to_promote_to_me_master'

Hba.conf @primary

host all all 0.0.0.0/0 md5
host replication replication samenet md5
host replication postgres,kbcn,replication 10.29.0.0/16 md5
host all kbcn,nagios,postgres samenet md5
host all postgres 0.0.0.0/0 md5
host all kbcn,nagios,postgres 10.29.0.0/16 md5
hostnossl replication replication,postgres 172.17.0.0/16 md5
hostnossl replication replication,postgres 10.29.0.0/16 md5
hostnossl replication replication,postgres 10.29.15.25/32 md5

hba.conf @standby

host all all 0.0.0.0/0 md5
host replication replication samenet md5
host replication postgres,kbcn,replication 10.29.0.0/16 md5
host all kbcn,nagios,postgres samenet md5
host all postgres 0.0.0.0/0 md5
host all kbcn,nagios,postgres 10.29.0.0/16 md5
hostnossl replication replication,postgres 172.17.0.0/16 md5
hostnossl replication replication,postgres 10.29.0.0/16 md5

Please suggest what I have missed.

Regards,
Daulat

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jamesie Pic 2019-04-22 11:01:00 Re: Where to store Blobs?
Previous Message Soni 2019-04-22 04:14:08 cache lookup failed for function 1 on fmgr_info_cxt_security, fmgr.c:184