• Tom Lane's avatar
    Fix failure to consider failure cases in GetComboCommandId(). · 0da3a9be
    Tom Lane authored
    Failure to initially palloc the comboCids array, or to realloc it bigger
    when needed, left combocid's data structures in an inconsistent state that
    would cause trouble if the top transaction continues to execute.  Noted
    while examining a user complaint about the amount of memory used for this.
    (There's not much we can do about that, but it does point up that repalloc
    failure has a non-negligible chance of occurring here.)
    
    In HEAD/9.5, also avoid possible invocation of memcpy() with a null pointer
    in SerializeComboCIDState; cf commit 13bba022.
    0da3a9be
combocid.c 10.1 KB