Those two switch()es are apparently redundant. That code is exactly equivalent to: apply_dispatch(s) { LogicalRepMsgType msgtype = pq_getmsgtype(s); switch (msgtype) { case LOGICAL_REP_MSG_BEGIN: apply_handle_begin(); ! return; ... case LOGICAL_REP_MSG_STREAM_COMMIT: apply_handle_begin(); ! return; } ereport(ERROR, (errmsg("invalid logical replication message type".. } which is smaller and fast.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных