Re: pg_waldump error message fix

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pg_waldump error message fix
Дата
Msg-id X9MB9fvSzIyD6K65@paquier.xyz
обсуждение исходный текст
Ответ на Re: pg_waldump error message fix  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: pg_waldump error message fix  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Fri, Dec 11, 2020 at 01:30:16PM +0900, Kyotaro Horiguchi wrote:
> currRecPtr is a private member of the struct (see the definition of
> the struct XLogReaderState).  We should instead use EndRecPtr outside
> xlog reader.

Please note that this is documented in xlogreader.h.  Hmm.  I can see
your point here, still I think that what both of you are suggesting
is not completely correct.  For example, switching to EndRecPtr would
cause DecodeXLogRecord() to report an error with the end of the
current record but it makes more sense to point to ReadRecPtr in this
case.  On the other hand, it would make sense to report the beginning
of the position we are working on when validating the header if an
error happens at this point.  So it seems to me that EndRecPtr or
ReadRecPtr are not completely correct, and that we may need an extra
LSN position to tell on which LSN we are working on instead that gets
updated before the validation part, because we update ReadRecPtr and
EndRecPtr only after this initial validation is done.
--
Michael

Вложения

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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pg_waldump error message fix
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_shmem_allocations & documentation