Re: backtrace_on_internal_error
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-12-07T14:22:10Z
Lists: pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes: > Something else to note: I wrote the above code to check the error code; > it doesn't check whether the original code write elog() or ereport(). > There are some internal errors that are written as ereport() now. > Others might be changed from time to time; until now there would have > been no external effect from this. I think it would be weird to > introduce a difference between these forms now. Yeah, that was bothering me too. IIRC, elog is already documented as being *exactly equivalent* to ereport with a minimal set of options. I don't think we should break that equivalence. So I agree with driving this off the stated-or-imputed errcode rather than which function is called. > Do people want a way to distinguish ERROR/FATAL/PANIC? > Or do people want a way to enable backtraces for elog(LOG)? Personally I don't see a need for either. regards, tom lane
Commits
-
Add GUC backtrace_on_internal_error
- a740b213d4b4 17.0 landed
-
Fix variable name and comment
- 541e8f14a185 17.0 landed
-
Be more wary about OpenSSL not setting errno on error.
- ebbd499d4b55 16.2 landed
- 87b46ad90491 13.14 landed
- 551d4b28e445 15.6 landed
- 271d24f31ddd 12.18 landed
- 0a5c46a7a488 17.0 landed
- 07ce2432682d 14.11 landed