What is the intended way to handle errors in the new logging hook? For
example, errors in establishing a connection to wherever a hook wants to
send things.
The reference implementation pg_logforward just uses fprintf(stderr) to
communicate its own errors, which doesn't seem ideal.
Calling elog(ERROR) in the logging hook causes death by recursion. It
seems that some of the recursion protection infrastructure of elog.c
isn't exposed to the public, so it's not obvious how to use it.
Should logging hooks handle this themselves (could be complicated,
multiple hooks etc.), or should we try to build this into elog.c where
the hooks are called?