Re: How to check stream replication latest history status

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: xuzhiyuster(at)gmail(dot)com
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to check stream replication latest history status
Date: 2022-11-15 03:05:33
Message-ID: 20221115.120533.1686733883786484377.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At Mon, 14 Nov 2022 00:09:36 +0800, 徐志宇徐 <xuzhiyuster(at)gmail(dot)com> wrote in
> If the primary and standby have long replay_lag. I don't want to
> standby server promote.
>
> Is there any view or function which store the latest stream
> replication gap(replay_lag) between primary and standby ?
> Or it there any workaround to know this stream replication
> gap(replay_lag) infomation ? Thanks for your help.

replay_lag vanishes when the steram is gone. But commit timestamps
might work for you. You can see when the last replayed transaction on
the standby was commited on the primary.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-11-15 04:05:23 Re: PANIC: could not flush dirty data: Cannot allocate memory
Previous Message Thomas Munro 2022-11-15 03:03:40 Re: PANIC: could not flush dirty data: Cannot allocate memory