• (
    Reset wrote_xlog in pg_conn to avoid keeping old value. (#11077) · 777b51cd
    (Jerome)Junfeng Yang 提交于
    On QD, it tracks whether QE wrote_xlog in the libpq connection.
    
    The logic is, if QE writes xlog, it'll send a libpq msg to QD. But the
    msg is sent in ReadyForQuery. So, before QE execute this function, the
    QE may already send back results to QD. Then when QD process this
    message, it does not read the new wrote_xlog value. This makes the
    connection still contains the previous dispatch wrote_xlog value,
    which will affect whether choosing one phase commit.
    
    The issue only happens when the QE flush the libpq msg before the
    ReadyForQuery function, hard to find a case to cover it.
    I found the issue when I playing the code to send some information from
    QE to QD. And it breaks the gangsize test which shows the commit info.
    777b51cd
cdbdisp_async.c 27.3 KB