> Offhand I don't think that happens at the moment, but it does seem like
> it'd be a good idea to have a backend do an elog(DEBUG) at startup that
> mentions its database name and user name. Assuming you have logging of
> timestamps/PIDs turned on, that would be enough to correlate later log
> messages with a user name.
Since each connection generates a backend process, I think the timestamp/PID
would be enough to relate log messages to an initial one saying: PID x
starting (database y, user z).
Maybe you could even include the source IP address, or whether it's an tcp
or a unix domain socket connection. Or maybe this is useless, dunno.