• Amit Kapila's avatar
    Fix initialization of RelationSyncEntry for streaming transactions. · 69bd6067
    Amit Kapila authored
    In commit 46482432, for each RelationSyncEntry we maintained the list
    of xids (streamed_txns) for which we have already sent the schema. This
    helps us to track when to send the schema to the downstream node for
    replication of streaming transactions. Before this list got initialized,
    we were processing invalidation messages which access this list and led
    to an assertion failure.
    
    In passing, clean up the nearby code:
    
    * Initialize the list of xids with NIL instead of NULL which is our usual
    coding practice.
    * Remove the MemoryContext switch for creating a RelationSyncEntry in dynahash.
    
    Diagnosed-by: Amit Kapila and Tom Lane
    Author: Amit Kapila
    Reviewed-by: Tom Lane and Dilip Kumar
    Discussion: https://postgr.es/m/904373.1600033123@sss.pgh.pa.us
    69bd6067
pgoutput.c 33 KB