Dear Hou,
Thanks for the patch. I reviewed 0001 and could not find critical issues.
Few comments;
01.
```
/* Remember the retained databases for
the next cycle. */
current_dbids =
lappend_oid(current_dbids, sub->dbid);
```
list_append_unique_oid() is usable here.
02. init_conflict_slot_xmin()
Not sure the function name is good because it can be called many times.
How about: reset_conflict_slot_xmin_to_safe_horizon()? Code comment should also
be updated.
03.
```
/* Write this slot to disk */
ReplicationSlotMarkDirty();
ReplicationSlotSave();
```
IIUC they are needed only if the slot is updated.
Best regards,
Hayato Kuroda
FUJITSU LIMITED