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