Standby node using replication slot not visible in pg_stat_replication while catching up - Mailing list pgsql-hackers

From Michael Paquier
Subject Standby node using replication slot not visible in pg_stat_replication while catching up
Date
Msg-id CAB7nPqRxLcBc7CAiYrOD3-gMLLJO12xnA-XRboGoVr_VEPqUxg@mail.gmail.com
Whole thread Raw
Responses Re: Standby node using replication slot not visible in pg_stat_replication while catching up  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Hi all,

I have been playing a bit with the replication slots, and I noticed a
weird behavior in such a scenario:
1) Create a master/slave cluster, and have slave use a replication slot
2) Stop the master
3) Create a certain amount of WAL, during my tests I played with 4~5GB of WAL
4) Restart the slave, it catches up with the WALs that master has
retained in pg_xlog.
I noticed that while the standby using the replication slot catches
up, it is not visible in pg_stat_replication on master. This makes
monitoring of the replication lag difficult to follow, particularly in
the case where the standby disconnects from the master. Once the
standby has caught up, it reappears once again in pg_stat_replication.
I didn't have a look at the code to see what is happening, but is this
behavior expected?
Regards,
-- 
Michael



pgsql-hackers by date:

Previous
From: Christian Kruse
Date:
Subject: Re: Patch: show relation and tuple infos of a lock to acquire
Next
From: Dean Rasheed
Date:
Subject: Re: WIP patch (v2) for updatable security barrier views