pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Convert debug message from ereport to elog
Date: Thu, 28 Jun 2018 10:27:18 +0200
Message-ID: <50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com> (raw)
In-Reply-To: <20180615.135300.2141289387353966369.t-ishii@sraoss.co.jp>
References: <E1fSlLl-0001W4-Me@gemulon.postgresql.org>
	<20180613.091354.212137329671150446.t-ishii@sraoss.co.jp>
	<4c06e956-c6df-7289-c9fa-55e9370d056e@2ndquadrant.com>
	<20180615.135300.2141289387353966369.t-ishii@sraoss.co.jp>

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




view thread (5+ messages)

Message-ID: <50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com>
Permalink:  ../50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com/
Also on:    postgresql.org/message-id/50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, ishii@sraoss.co.jp
  Subject: Re: pgsql: Convert debug message from ereport to elog
  In-Reply-To: <50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com>
  References: <E1fSlLl-0001W4-Me@gemulon.postgresql.org> <20180613.091354.212137329671150446.t-ishii@sraoss.co.jp> <4c06e956-c6df-7289-c9fa-55e9370d056e@2ndquadrant.com> <20180615.135300.2141289387353966369.t-ishii@sraoss.co.jp> <50847dd2-10c1-cda6-2941-167dda9e23ff@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox