[COMMITTERS] pgsql-server: Tweak elog.c's logic for promoting errors into more severe
Log Message: --- Tweak elog.c's logic for promoting errors into more severe errors. Messages of less than ERROR severity should never be promoted (this fixes Gaetano Mendola's problem with a COMMERROR becoming a PANIC, and is obvious in hindsight anyway). Do all promotion in errstart not errfinish, to ensure that output decisions are made correctly; the former coding could suppress logging of promoted errors, which doesn't seem like a good idea. Eliminate some redundant code too. Modified Files: -- pgsql-server/src/backend/utils/error: elog.c (r1.148 -> r1.149) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/error/elog.c.diff?r1=1.148&r2=1.149) ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
[COMMITTERS] pgsql-server: On further consideration, there's another problem here:
Log Message: --- On further consideration, there's another problem here: the existing elog() emulation code always calls errstart with ERROR error level. This means that a recursive error call triggered by elog would do MemoryContextReset(ErrorContext), whether or not this was actually appropriate. I'm surprised we haven't seen this in the field... Modified Files: -- pgsql-server/src/backend/utils/error: elog.c (r1.149 -> r1.150) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/error/elog.c.diff?r1=1.149&r2=1.150) pgsql-server/src/include/utils: elog.h (r1.75 -> r1.76) (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/utils/elog.h.diff?r1=1.75&r2=1.76) ---(end of broadcast)--- TIP 8: explain analyze is your friend
