On 2019-04-01 20:55, Andres Freund wrote: > A written upthread, I think this should have had a uniform interface > with elog.h, and probably even share some code between the two.
The purpose of this patch was to consolidate the existing zoo of logging routines in the frontend programs. That has meaningful benefits. There is hardly any new code; most of the code was just consolidated from existing scattered code. If someone wants to take it further and consolidate that with the backend logging infrastructure, they are free to propose a patch for consideration. Surely the present patch can only help, since it already makes the call sites uniform, which would presumably have to be done anyway. However, there is no prototype or even detailed design sketch let alone someone committing to implement such a project. So it seems unreasonable to block other meaningful improvements in adjacent areas in the meantime. > This is > going in the wrong direction, making it harder, not easier, to share > code between frontend and backend. I don't think anything has changed in that respect. If there is reason to believe that code that uses fprintf() is easier to share with the backend than alternatives, then nothing is standing in the way of continuing to use that. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services