Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: pg_walinspect - a new extension to get raw WAL data and WAL stats
Дата
Msg-id 202110061723.h6sap4ep3ij3@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: pg_walinspect - a new extension to get raw WAL data and WAL stats  (Jeremy Schneider <schneider@ardentperf.com>)
Список pgsql-hackers
On 2021-Oct-06, Jeremy Schneider wrote:

> Well this whole conversation is just theoretical anyway until the code
> is shared.  :)  But if Bharath is writing functions to decode WAL, then
> wouldn't we just have pg_waldump use these same functions in order to
> avoid duplicating code?

Actually, a lot of the code is already shared, since the rmgrdesc
routines are in src/backend.  Keep in mind that it was there before
pg_xlogdump existed, to support WAL_DEBUG.  When pg_xlogdump was added,
what we did was allow that backend-only code be compilable in a frontend
environment.  Also, we already have xlogreader.

So pg_waldump itself is mostly scaffolding to let the frontend
environment get argument values to pass to backend-enabled code.  The
only really interesting, novel thing is the --stats mode ... and I bet
you can write that with some SQL-level aggregation of the raw data, no
need for any C code.

-- 
Álvaro Herrera              Valdivia, Chile  —  https://www.EnterpriseDB.com/



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Role Self-Administration
Следующее
От: Mark Dilger
Дата:
Сообщение: Re: Role Self-Administration