Add last failed connection error message to pg_stat_wal_receiver

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Add last failed connection error message to pg_stat_wal_receiver
Дата
Msg-id CALj2ACWt6wkFnu7sac3pUb4WLZ3jA1m3cu7FJE3EovpGKzhwKw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add last failed connection error message to pg_stat_wal_receiver  (Cary Huang <cary.huang@highgo.ca>)
Список pgsql-hackers
Hi,

In production environments WAL receiver connection attempts to primary
may fail for many reasons (primary down, network is broken,
authentication tokens changes, primary_conn_info modifications, socket
errors and so on.). Although we emit the error message to server logs,
isn't it useful to show the last connection error message via
pg_stat_wal_receiver or pg_stat_get_wal_receiver? This will be super
helpful in production environments to analyse what the WAL receiver
issues as accessing and sifting through server logs can be quite
cumbersome for the end users.

Thoughts?

Attached patch can only display the last_conn_error only after the WAL
receiver is up, but it will be good to let pg_stat_wal_receiver emit
last_conn_error even before that. Imagine WAL receiver is continuously
failing on the standby, if we let pg_stat_wal_receiver report
last_conn_error, all other columns will show NULL. I can change this
way, if others are okay with it.

Regards,
Bharath Rupireddy.

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: postgres_fdw: commit remote (sub)transactions in parallel during pre-commit