Don't duplicate code. If you are reusing a function, my advice is to move it to
src/common. You can always use "ifdef FRONTEND" to use the appropriate log
message (elog/ereport vs pg_error, for example).
I have made all the changes except for this one, and I am deferring to Amit Kapila regarding the marks.
Regarding duplicating code - I was trying to keep the change contained. Is it okay to make that change in a separate check in since it would also touch src/backend/postmaster/syslogger.c?
Thank you!
Gyan Sreejith