Re: Remove page-read callback from XLogReaderState.

Поиск
Список
Период
Сортировка
От Antonin Houska
Тема Re: Remove page-read callback from XLogReaderState.
Дата
Msg-id 25494.1558526003@spoje.net
обсуждение исходный текст
Ответ на Re: Remove page-read callback from XLogReaderState.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Remove page-read callback from XLogReaderState.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> wrote:

> Hello. Thank you for looking this.
> ...
> Yeah, I'll register this, maybe the week after next week.

I've checked the new version. One more thing I noticed now is that XLR_STATE.j
is initialized to zero, either by XLogReaderAllocate() which zeroes the whole
reader state, or later by XLREAD_RESET. This special value then needs to be
handled here:

#define XLR_SWITCH()                    \
    do {                        \
        if ((XLR_STATE).j)            \
            goto *((void *) (XLR_STATE).j);    \
        XLR_CASE(XLR_INIT_STATE);        \
    } while (0)

I think it's better to set the label always to (&&XLR_INIT_STATE) so that
XLR_SWITCH can perform the jump unconditionally.

Attached is also an (unrelated) comment fix proposal.

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: accounting for memory used for BufFile during hash joins
Следующее
От: Robert Haas
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs