[GENERAL] Understanding pg_last_xlog_receive_location

Поиск
Список
Период
Сортировка
От Zach Walton
Тема [GENERAL] Understanding pg_last_xlog_receive_location
Дата
Msg-id CAK-a08q0+U3W3twpA7Bt6CtAMDbSEEMVw0cwvVEruNUvzTU1Hg@mail.gmail.com
обсуждение исходный текст
Ответы Re: [GENERAL] Understanding pg_last_xlog_receive_location  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-general
I'm following the documentation here (using postgresql 9.4.5): https://www.postgresql.org/docs/9.4/static/functions-admin.html

I'm attempting to fully understand the interplay between pg_is_in_recovery() + pg_last_xlog_receive_location() + pg_last_xlog_replay_location() so we can devise a reliable health check script.

Here's a database that is configured as a hot standby for streaming replication.

appdb=> SELECT pg_is_in_recovery(), pg_last_xlog_receive_location(), pg_last_xlog_replay_location(); pg_is_in_recovery | pg_last_xlog_receive_location | pg_last_xlog_replay_location -------------------+-------------------------------+------------------------------ t | | 0/70A4C88 (1 row)

Note that the DB is in recovery, but that pg_last_xlog_receive_location is NULL while pg_last_xlog_replay_location is 0/70A4C88.

I'm not sure I understand how this is possible. According to the docs, pg_last_xlog_receive_location can only be NULL when streaming is disabled (not the case) or hasn't started yet (doesn't seem possible when pg_last_xlog_replay_location is set).

Could someone help shed some light on what state results in pg_last_xlog_receive_location being NULL when pg_last_xlog_replay_location is set?

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

Предыдущее
От: "Frazer McLean"
Дата:
Сообщение: Re: [GENERAL] Configuring ssl_crl_file
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] Configuring ssl_crl_file