Re: Return value of XLogInsertRecord() for XLOG_SWITCH record

Поиск
Список
Период
Сортировка
От cca5507
Тема Re: Return value of XLogInsertRecord() for XLOG_SWITCH record
Дата
Msg-id tencent_E61B19333CAD03393BB350CFC2EBDA879407@qq.com
обсуждение
Ответ на Re: Return value of XLogInsertRecord() for XLOG_SWITCH record  (반지현 <rring0727@gmail.com>)
Ответы Re: Return value of XLogInsertRecord() for XLOG_SWITCH record
Список pgsql-hackers
Hi, thanks for the test!

> One question:
> The original code did not apply MAXALIGN() to SizeOfXLogRecord before
> adding it. In practice SizeOfXLogRecord is likely already MAXALIGN'd
> (given typical record header layout), but could you confirm whether
> MAXALIGN() here is a correctness fix, a defensive no-op, or something
> that requires a separate note in the commit message?
>
> Otherwise the change looks good to me, and I think it's a reasonable
> cleanup.

I apply the MAXALIGN() to keep it consistent with ReserveXLogSwitch(), the
value seems unchanged though.

Attach v2 which is more efficient.

--
Regards,
ChangAo Chen

Вложения

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