Hi all,
(Thomas in CC as per 6912acc0)
I got surprised by the following behavior from pg_stat_get_wal_senders
when connecting for example pg_receivewal to a primary:
=# select application_name, flush_lsn, replay_lsn, flush_lag,
replay_lag from pg_stat_replication;
application_name | flush_lsn | replay_lsn | flush_lag | replay_lag
------------------+-----------+------------+-----------------+-----------------
receivewal | null | null | 00:09:13.578185 | 00:09:13.578185
(1 row)
It makes little sense to me, as we are reporting a replay lag on a
position which has never been reported yet, so it cannot actually be
used as a comparison base for the lag. Am I missing something or
should we return NULL for those fields if we have no write, flush or
apply LSNs like in the attached?
Thoughts?
--
Michael