From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Printing backtrace of postgres processes |
Date: | 2020-12-01 04:01:25 |
Message-ID: | 1361750.1606795285@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> It should be quite doable to emit such backtraces directly to stderr,
> instead of using appendStringInfoString()/elog().
No, please no.
(1) On lots of logging setups (think syslog), anything that goes to
stderr is just going to wind up in the bit bucket. I realize that
we have that issue already for memory context dumps on OOM errors,
but that doesn't make it a good thing.
(2) You couldn't really write "to stderr", only to fileno(stderr),
creating issues about interleaving of the output with regular stderr
output. For instance it's quite likely that the backtrace would
appear before stderr output that had actually been emitted earlier,
which'd be tremendously confusing.
(3) This isn't going to do anything good for my concerns about interleaved
output from different processes, either.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2020-12-01 04:03:41 | TAP test utility module 'PG_LSN.pm' |
Previous Message | Amit Kapila | 2020-12-01 03:54:45 | Re: [HACKERS] logical decoding of two-phase transactions |