RE: Follow-up review items for update_deleted - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Follow-up review items for update_deleted
Date
Msg-id OS9PR01MB1214975F154718013E1B82D4AF5B62@OS9PR01MB12149.jpnprd01.prod.outlook.com
Whole thread
In response to Re: Follow-up review items for update_deleted  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: Offline data checksum changes can cause incorrect checksum state on standbys
Next
From: Chee Wooson
Date:
Subject: [PATCH v2] Avoid carrying self lock-only xmax to updated tuple