On Sat, Jan 18, 2025 at 9:15 AM Zhijie Hou (Fujitsu) <houzj.f...@fujitsu.com> wrote: > > > Here is the V24 patch set. I modified 0004 patch to implement the slot > Invalidation part. Since the automatic recovery could be an optimization and > the discussion is in progress, I didn't implement that part.
Few comments for patch-0004 ==== src/backend/replication/slot.c 1) Need to describe the new macro RS_INVAL_CONFLICT_RETENTION_DURATION in the comments above InvalidateObsoleteReplicationSlots(), where all other invalidation causes are explained. ... * Whether a slot needs to be invalidated depends on the cause. A slot is * removed if it: * - RS_INVAL_WAL_REMOVED: requires a LSN older than the given segment * - RS_INVAL_HORIZON: requires a snapshot <= the given horizon in the given * db; dboid may be InvalidOid for shared relations * - RS_INVAL_WAL_LEVEL: is logical ... 2) Can we mention the GUC parameter that defines this "maximum limit" while reporting? + + case RS_INVAL_CONFLICT_RETENTION_DURATION: + appendStringInfo(&err_detail, _("The duration for retaining conflict information exceeds the maximum limit.")); + break; + Something like - "The duration for retaining conflict information exceeds the maximum limit configured in \"%s\".","max_conflict_retention_duration" ===== doc/src/sgml/ref/create_subscription.sgml 3) + <para> + Note that setting a non-zero value for this option could lead to + conflict information being removed prematurely, potentially missing + some conflict detections. + </para> Should we add the above info as a “Warning” in the docs?