Re: Add pg_walinspect function with block info columns

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Add pg_walinspect function with block info columns
Дата
Msg-id CAH2-WznDNVcyNLUPYs0W6KtYLc0diZrCqaDC7bwWPg=WV+UYYg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add pg_walinspect function with block info columns  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: Add pg_walinspect function with block info columns  (Peter Geoghegan <pg@bowt.ie>)
Re: Add pg_walinspect function with block info columns  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Mon, Mar 20, 2023 at 4:34 PM Peter Geoghegan <pg@bowt.ie> wrote:
> I agree. A little redundancy is better when the alternative is fragile
> code, and I'm pretty sure that that applies here -- there won't be
> very many duplicated lines, and the final code will be significantly
> clearer. There can be a comment about keeping GetWALRecordInfo and
> GetWALBlockInfo in sync.

The new pg_get_wal_block_info outputs columns in an order that doesn't
seem like the most useful possible order to me. This gives us another
reason to have separate GetWALRecordInfo and GetWALBlockInfo utility
functions rather than sharing logic for building output tuples.

Specifically, I think that pg_get_wal_block_info should ouput the
"primary key" columns first:

reltablespace, reldatabase, relfilenode, blockid, start_lsn, end_lsn

Next comes the columns that duplicate the columns output by
pg_get_wal_records_info, in the same order as they appear in
pg_get_wal_records_info. (Obviously this won't include block_ref).

--
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Save a few bytes in pg_attribute
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Add pg_walinspect function with block info columns