Dear Wang,
Thank you for updating the patch! Followings are my comments.
---
01. missing comments
You might miss the comment from Peter[1]. Or could you pin the related one?
---
02. LogicalDecodingProcessRecord()
Don't we have to call UpdateDecodingProgressAndKeepalive() when there is no
decoding function? Assuming that the timeout parameter does not have enough time
period and there are so many sequential operations in the transaction. At that time
there may be a possibility that timeout is occurred while calling ReorderBufferProcessXid()
several times. It may be a bad example, but I meant to say that we may have to
consider the case that decoding function has not implemented yet.
---
03. stream_*_cb_wrapper
Only stream_*_cb_wrapper have comments "don't call update progress, we didn't really make any", but
there are more functions that does not send updates. Do you have any reasons why only they have?
[1]: https://www.postgresql.org/message-id/CAHut%2BPsksiQHuv4A54R4w79TAvCu__PcuffKYY0V96e2z_sEvA%40mail.gmail.com
Best Regards,
Hayato Kuroda
FUJITSU LIMITED