Hi,

On Tue, Nov24, 2026 at 12:45 PM Peter Smith wrote:
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.

Since it's a file-local static helper with a single caller right
below it that already initializes omitted = false, it would be unnecessary to me for the extra Assert or comment here.


======
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.


I think the suggested text is not clearly better, so kept the current text as is.


--
Best Regards,
Zhijie Hou


Reply via email to