On Sat, Apr 8, 2023 at 12:00 AM Hayato Kuroda (Fujitsu) <kuroda.hay...@fujitsu.com> wrote: > ... > > 17. main > > > > + /* > > + * Create replication slots if requested. > > + * > > + * XXX This must be done after doing pg_resetwal command because the > > + * command will remove required WALs. > > + */ > > + if (user_opts.include_slots) > > + { > > + start_postmaster(&new_cluster, true); > > + create_replicaiton_slots(); > > + stop_postmaster(false); > > + } > > + > > > > I don't think that warrants a "XXX" style comment. It is just a "Note:". > > Fixed. Could you please tell me the classification of them if you can?
Hopefully, someone will correct me if this explanation is wrong, but my understanding of the different prefixes is like this -- "XXX" is used as a marker for future developers to consider maybe revisiting/improving something that the comment refers to e.g. /* XXX - it would be better to code this using blah but for now we did not.... */ /* XXX - option 'foo' is not currently supported but... */ /* XXX - it might be worth considering adding more checks or an assert here because... */ OTOH, "Note" is just for highlighting why something is the way it is, but with no implication that it should be revisited/changed in the future. e.g. /* Note: We deliberately do not test the state here because... */ /* Note: This memory must be zeroed because... */ /* Note: This string has no '\0' terminator so... */ ------ Kind Regards, Peter Smith. Fujitsu Australia