Some minor review comments for v96-0001 (code/comments) ====== src/backend/replication/logical/conflict.c
1. +/* + * build_index_key_json + * + * Fetch replica identity key from the tuple table slot and convert into a + * JSON datum. + * + * The caller must ensure that the index with the OID 'indexid' is locked so + * that we can safely fetch and construct the replica identity key values. + * See comments atop ReportApplyConflict() for how this holds. + */ +static Datum +build_index_key_json(EState *estate, Relation localrel, + Oid indexid, TupleTableSlot *slot, + bool *omitted) 1a. Function comment should describe the `omitted` parameter. ~ 1b. IMO it might be good to Assert(*omitted == false); at the top of this function as a sanity check to ensure the caller has already assigned it. ====== src/backend/replication/logical/worker.c 2. /* * The tuple to be updated could not be found or was deleted. Do - * nothing except for emitting a log message. + * nothing except for reporting the conflict. */ SUGGESTION (last sentence) Do nothing except report the conflict. ~~~ 3. /* * The tuple to be updated could not be found or was - * deleted. Do nothing except for emitting a log message. + * deleted. Do nothing except for reporting the conflict. */ SUGGESTION (last sentence) Do nothing except report the conflict. ====== Kind Regards, Peter Smith. Fujitsu Australia
