| From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
|---|---|
| To: | Zhijie Hou <houzhijie22(at)gmail(dot)com> |
| Cc: | vignesh C <vignesh21(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, saurabh singh <saurabh(dot)singh214(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Proposal: Conflict log history table for Logical Replication |
| Date: | 2026-11-24 04:45:57 |
| Message-ID: | CAHut+PsLH9XrPYxbGvF-PkXX3xRuyqPDKK9s4B5pD_Ppm-KEUg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dilip Kumar | 2026-11-24 05:17:03 | Re: Bug in logical decoding with DDL and subtransactions |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-11-24 04:25:39 | RE: Fix LogStandbySnapshot() race during logical decoding activation |