On Fri, Feb 2, 2024 at 11:18 PM shveta malik <shveta.ma...@gmail.com> wrote: > > On Fri, Feb 2, 2024 at 12:25 PM Peter Smith <smithpb2...@gmail.com> wrote: > > > > Here are some review comments for v750002. > > Thanks for the feedback Peter. Addressed all in v76 except one. > > > (this is a WIP but this is what I found so far...) > > > I wonder if it is better to log all the problems in one go instead of > > making users stumble onto them one at a time after fixing one and then > > hitting the next problem. e.g. just set some variable "all_ok = > > false;" each time instead of all the "return false;" > > > > Then at the end of the function just "return all_ok;" > > If we do this way, then we need to find a way to combine the msgs as > well, otherwise the same msg will be repeated multiple times. For the > concerned functionality (which needs one time config effort by user), > I feel the existing way looks okay. We may consider optimizing it if > we get more comments here. >
I don't think combining messages is necessary; I considered these all as different (not the same msg repeated multiple times) since they all have different errhints. I felt a user would only know to make a configuration correction when they are informed something is wrong, so my review point was we could tell them all the wrong things up-front so then those can all be fixed with a "one time config effort by user". Otherwise, if multiple settings (e.g. from the list below) have wrong values, I imagined the user will fix the first reported one, then the next bad config will be reported, then the user will fix that one, then the next bad config will be reported, then the user will fix that one, and so on. It just seemed potentially/unnecessarilly painful. - errhint("\"%s\" must be defined.", "primary_slot_name")); - errhint("\"%s\" must be enabled.", "hot_standby_feedback")); - errhint("\"wal_level\" must be >= logical.")); - errhint("\"%s\" must be defined.", "primary_conninfo")); - errhint("'dbname' must be specified in \"%s\".", "primary_conninfo")); ~ Anyway, I just wanted to explain my review comment some more because maybe my reason wasn't clear the first time. Whatever your decision is, it is fine by me. ====== Kind Regards, Peter Smith. Fujitsu Australia