Enhanced rmgr desc routines test !has_image, not has_data

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Enhanced rmgr desc routines test !has_image, not has_data
Дата
Msg-id CAH2-Wzm5Sc9cBg1qWV_cEBfLNJCrW9FjS-SoHVt8FLA7Ldn8yg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Enhanced rmgr desc routines test !has_image, not has_data  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Recent commits that enhanced rmgr desc routines (commits 7d8219a4 and
1c453cfd) dealt with records that lack relevant block data (and so
lack anything to give a more detailed summary of) by testing
!DecodedBkpBlock.has_image -- that is the gating condition that
determines if we want to (say) output a textual array representation
of the page offset number from a given nbtree VACUUM WAL record.
Strictly speaking, this isn't the correct gating condition to test. We
should be testing the *presence* of the relevant block data instead.
Why test an inexact proxy for the condition that we care about, when
we can just as easily test the precise condition we care about
instead?

This isn't just a theoretical issue. Currently, we won't display
detailed descriptions of block data whenever wal_consistency_checking
happens to be in use. At least for those records with relevant block
data available to summarize that also happen to have an FPI that the
REDO routine isn't supposed to apply (i.e. an FPI that is included in
the record purely so that verifyBackupPageConsistency can verify that
the REDO routine produces a matching image).

Attached patch fixes this bug.

-- 
Peter Geoghegan

Вложения

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

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Request for comment on setting binary format output per session
Следующее
От: David Rowley
Дата:
Сообщение: Re: Should we put command options in alphabetical order in the doc?