Re: Writing WAL files

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: Writing WAL files
Дата
Msg-id CAHOFxGosVP6OKEgBHrt4gEuA5mcVUTsKhhjGMtYTaks6ojgx3g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Writing WAL files  (Robert Inder <robert@interactive.co.uk>)
Ответы Re: Writing WAL files  (Robert Inder <robert@interactive.co.uk>)
Re: Writing WAL files  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general

I suggest that in PG12 you can monitor the
"lag" of a standby server more directly by looking at columns write_lag,
flush_lag, replay_lag in the pg_stat_replication view. 

And are those things updated when there are no changes to the master database?
If so, can anyone make the case that continually checking and updating them (how often?) wastes fewer electrons than shipping an empty file every few minutes?

Or are they only measured when something is updated?

If you setup a scripted process to update a single row with a timestamptz on the source/primary every minute, then you have a very simple consistent change and also a way to check on the replica what is current time vs last_scripted_update_time if you will and know the approx lag. It would seem like a simple albeit hacky solution to you wanting a file every X minutes regardless of server activity.

By the by, top-posting (reply above all quoted text) is discouraged on these groups.

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: UUID generation problem
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: UUID generation problem