Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display
Дата
Msg-id 6e1625c2-ad82-4dad-8ccf-01d8a7dbb0d3@www.fastmail.com
обсуждение исходный текст
Ответ на Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Thu, Nov 11, 2021, at 2:50 AM, Bharath Rupireddy wrote:
But for the snprintf(activitymsg, sizeof(activitymsg), "archiving %s",
xlog); we have elog(DEBUG1, "archived write-ahead log file \"%s\"",
xlog); after the archiving command. It is also good to have a similar
debug message before archive command execution, we can get to know
whether archive command is executed or not, if yes how much time did
it take etc.?
If you are only interested in how much time it took to archive a WAL file, you
don't need 2 messages (before and after); one message is sufficient. If you
calculate the difference and then print it as part of the existent message.
Calculate the difference iif the log level is at least DEBUG1 (same as the log
message).

Messages related to system() e.g. archive and recovery, you could measure the
execution time in your own script/program.

I like Alvaro's idea of implementing a ring buffer for this kind of activity.
This implementation could be applied to checkpoints, archiving, recovery,
replication, base backup, WAL usage, connections and others.


--
Euler Taveira

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

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: .ready and .done files considered harmful
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: Improving psql's \password command