Hi Nisha,
Some review comments for v66-0001.
======
src/backend/replication/slot.c
ReportSlotInvalidation:
1.
StringInfoData err_detail;
+ StringInfoData err_hint;
bool hint = false;
initStringInfo(&err_detail);
+ initStringInfo(&err_hint);
I don't think you still need the 'hint' boolean anymore.
Instead of:
hint ? errhint("%s", err_hint.data) : 0);
You could just do something like:
err_hint.len ? errhint("%s", err_hint.data) : 0);
~~~
2.
+ appendStringInfo(&err_hint, "You might need to increase \"%s\".",
+ "max_slot_wal_keep_size");
break;
2a.
In this case, shouldn't you really be using macro _("You might need to
increase \"%s\".") so that the common format string would be got using
gettext()?
~
2b.
Should you include a /* translator */ comment here? Other places where
GUC name is substituted do this.
~~~
3.
+ appendStringInfo(&err_hint, "You might need to increase \"%s\".",
+ "idle_replication_slot_timeout");
+ break;
3a.
Ditto above. IMO this common format string should be got using macro.
e.g.: _("You might need to increase \"%s\".")
~
3b.
Should you include a /* translator */ comment here? Other places where
GUC name is substituted do this.
======
Kind Regards,
Peter Smith.
Fujitsu Australia