Re: pgsql: Convert debug message from ereport to elog - Mailing list pgsql-committers

From Peter Eisentraut
Subject Re: pgsql: Convert debug message from ereport to elog
Date
Msg-id 50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com
Whole thread Raw
In response to Re: pgsql: Convert debug message from ereport to elog  (Tatsuo Ishii <ishii@sraoss.co.jp>)
List pgsql-committers
On 6/15/18 06:53, Tatsuo Ishii wrote:
> Therefore, elog should be used only for internal errors and low-level
> debug logging. Also for these purposes ereport should not be used.

ereport() has the advantage that if the debug level excludes the
message, then the errmsg() call won't even be run and therefore the
message doesn't have to be computed.  So actually ereport() is
preferable in many cases for debug messages.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Fix typo in comment
Next
From: Bruce Momjian
Date:
Subject: pgsql: doc: backpatch mention use of cross platform logicalreplication