Open tylarb opened 2 years ago
class PgWrapper
to do an append-redirect (2>>
) to <processname>_<pid>.STDERR
(pid to differentiate different instantiations of the same process) in the log directory at the time of creating the process, and then tools might transparently pick it up.Hari added a mechanism to save stderr for some processes run on the yb master in some situations in the pg15-upgrade branch, for example: https://github.com/yugabyte/yugabyte-db/blob/f86bd6cff3215f7b5f8d16865fe79fb5c90ac2c0/src/yb/yql/pgwrapper/pg_wrapper.cc#L872
It's not streaming stderr, but at least it gets collected.
Also consider K8, systemd deployments to capture PostgreSQL stderr logs.
Jira Link: DB-552
Description
Currently, we only capture the error code on a postgres process start, like:
This is a problem in the case of a postgres process failing to start before it can log to
postgres.log
because then there's no way to see the failure message, which would be printed to stderr.In one case, we got lucky and could run the full postgres command on the command line itself...
Showing us the actual issue...
so it would be great if we could capture the stderr of postgres process failures to speed resolution of this type of issue.