Re: Add pg_walinspect function with block info columns

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Add pg_walinspect function with block info columns
Дата
Msg-id CAH2-Wzm-LaF3tQxzW=S16kOJZEivuzGGyz56wKTz+SnK2oKwgQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add pg_walinspect function with block info columns  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Add pg_walinspect function with block info columns  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
On Tue, Mar 14, 2023 at 3:34 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> After patching master to add in the columns from
> pg_get_wal_records_info() which are not returned by
> pg_get_wal_block_info() (except block_ref column of course), this query:
>
>   SELECT COUNT(*) FROM pg_get_wal_block_info(:start_lsn, :end_lsn);
>
> took 467 ms.
>
> Perhaps this difference isn't important, but I found it noticeable.

This seems weird to me too. It's not so much the performance overhead
that bothers me (though that's not great either). It seems *illogical*
to me. The query you end up writing must do two passes over the WAL
records, but its structure almost suggests that it's necessary to do
two separate passes over distinct "streams".

Why doesn't it already work like this? Why do we need a separate
pg_get_wal_block_info() function at all?

--
Peter Geoghegan



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Track IO times in pg_stat_io
Следующее
От: Jim Jones
Дата:
Сообщение: Re: [PATCH] Add pretty-printed XML output option