Re: Pause streaming replication

Поиск
Список
Период
Сортировка
От Ben Chobot
Тема Re: Pause streaming replication
Дата
Msg-id 2b7b26f6-d00b-edad-7ea6-160c699219d3@silentmedia.com
обсуждение исходный текст
Ответ на Re: Pause streaming replication  (Rita <rmorgan466@gmail.com>)
Список pgsql-general
Rita wrote on 11/10/21 5:36 PM:
Yes, I have read the manual and seen this. It pauses the replication (select pg_is_wal_replay_paused()). But on the primary, when I look at pg_stat_replication, it still says 'streaming' in the state column. My question was how do I get it from 'streaming'  to anything else?  (https://www.postgresql.org/docs/11/monitoring-stats.html#PG-STAT-REPLICATION-VIEW) ?

I want to trigger an alert when 'streaming' isn't there. Or is there a better way to do it?

Oh yes, I'm sorry. I see now that was your original question, and my suggestion doesn't help you there.

But I would say that, in my experience with monitoring streaming replication, I haven't cared so much about if the replica is streaming vs. rebuilding, but rather how far behind it has fallen when it is supposedly streaming. Pausing replication lets you see what it will look like when a disk failure blocks your replica's writes, or client activity blocks wal replay, which are absolutely situations you want to monitor for.

В списке pgsql-general по дате отправления:

Предыдущее
От: Rita
Дата:
Сообщение: Re: Pause streaming replication
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Pause streaming replication