Function and view to retrieve WAL receiver status

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Function and view to retrieve WAL receiver status
Дата
Msg-id CAB7nPqQXTmJMU=NNO_MusJGUaBWaKvZO+XUPWG9arWPx3NXvEA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Function and view to retrieve WAL receiver status  (Gurjeet Singh <singh.gurjeet@gmail.com>)
Список pgsql-hackers
Hi all,

Currently there is no equivalent of pg_stat_get_wal_senders for the
WAL receiver on a node, and it seems that it would be useful to have
an SQL representation of what is in shared memory should a WAL
receiver be active without going through the ps display for example.
So, any opinion about having in core a function called
pg_stat_get_wal_receiver that returns a single tuple that translates
the data WalRcvData?
We could bundle on top of it a system view, say called
pg_stat_wal_receiver, with this layer:
View "public.pg_stat_wal_receiver"
Column|Type|Modifiers
pid|integer|
status|text|
receive_start_lsn|pg_lsn|
receive_start_tli|integer|
received_up_to_lsn|pg_lsn|
received_tli|integer|
latest_chunk_start_lsn|pg_lsn|
last_msg_send_time|timestamp with time zone|
last_msg_receipt_time|timestamp with time zone|
latest_end_lsn|pg_lsn|
latest_end_time|timestamp with time zone|
slot_name|text|

If the node has no WAL receiver active, a tuple with NULL values is
returned instead.
Thoughts?
-- 
Michael



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Making tab-complete.c easier to maintain
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [sqlsmith] Failed to generate plan on lateral subqueries