WAL usage calculation patch

Поиск
Список
Период
Сортировка
От Kirill Bychik
Тема WAL usage calculation patch
Дата
Msg-id CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: WAL usage calculation patch  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
Hello pgsql-hackers,

Submitting a patch that would enable gathering of per-statement WAL
generation statistics, similar to how it is done for buffer usage.
Collected is the number of records added to WAL and number of WAL
bytes written.

The data collected was found valuable to analyze update-heavy load,
with WAL generation being the bottleneck.

The usage data is collected at low level, after compression is done on
WAL record. Data is then exposed via pg_stat_statements, could also be
used in EXPLAIN ANALYZE if needed. Instrumentation is alike to the one
used for buffer stats. I didn't dare to unify both usage metric sets
into single struct, nor rework the way both are passed to parallel
workers.

Performance impact is (supposed to be) very low, essentially adding
two int operations and memory access on WAL record insert. Additional
efforts to allocate shmem chunk for parallel workers. Parallel workers
shmem usage is increased to fir in a struct of two longs.

Patch is separated in two parts: core changes and pg_stat_statements
additions. Essentially the extension has its schema updated to allow
two more fields, docs updated to reflect the change. Patch is prepared
against master branch.

Please provide your comments and/or code findings.

Вложения

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

Предыдущее
От: Sehrope Sarkuni
Дата:
Сообщение: Re: Internal key management system
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Documentation patch for ALTER SUBSCRIPTION