How to measure replication lag in logical replication setup.

From: rammohan ganapavarapu <rammohanganap(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: How to measure replication lag in logical replication setup.
Date: 2017-11-08 02:52:06
Message-ID: CALm_VjgnWfTimUMCB3+71R2FGr9fuzJWWoYEc56UcyHCP9-vQA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

HI,

How to measure replication lag time in case of logical replication?

this query is returning empty

SELECT now() - pg_last_xact_replay_timestamp() AS time_lag;
time_lag
----------

(1 row)

this is my slot details

SELECT * FROM pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | active | xmin |
catalog_xmin | restart_lsn
-----------+--------+-----------+--------+----------+--------+------+--------------+-------------
slot_1 | | physical | | | t | 1983 |
| 0/50805C8

In my case slot_type is physical, does it look ok or for logical
replication the slot_type should be logical?

Thanks,
Ram

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Thomas Kellerer 2017-11-08 06:56:29 Re: Running Windows binaries from non-English folder
Previous Message Yuri Martsinovsky 2017-11-07 19:30:46 Running Windows binaries from non-English folder