postgres.git / summary / log / commit / refs

commit    7e17a6889a4441c2cebca2dd47f4170ff8dc5de2
Author:   Simon Riggs <simon@2ndQuadrant.com>
Date:     Wed Nov 22 05:28:14 2017 +0000

    Set es_output_cid in replication worker
    
    Allows triggers to operate correctly
    
    Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
    Reported-by: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>


src/backend/replication/logical/worker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index 0e68670767a..fa5d9bb1201 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -204,6 +204,8 @@ create_estate_for_relation(LogicalRepRelMapEntry *rel) estate->es_num_result_relations = 1; estate->es_result_relation_info = resultRelInfo; + estate->es_output_cid = GetCurrentCommandId(true); + /* Triggers might need a slot */ if (resultRelInfo->ri_TrigDesc) estate->es_trig_tuple_slot = ExecInitExtraTupleSlot(estate); [parent: 16827d442448]