pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
CONTEXT messages for raise EXCEPTION
5+ messages / 3 participants
[nested] [flat]

* CONTEXT messages for raise EXCEPTION
@ 2008-02-13 17:27 Michael Shapiro <mshapiro51@gmail.com>
  2008-02-13 19:11 ` Re: CONTEXT messages for raise EXCEPTION Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Michael Shapiro @ 2008-02-13 17:27 UTC (permalink / raw)
  To: pgsql-admin@postgresql.org.

I am getting a lot of CONTEXT information along with the message when an
EXCEPTION is raised. Does anyone know what controls whether EXCEPTIONS add
the CONTEXT or not? This problem appeared recently in our server - 8.1.9/linux
- but none as far as we can tell we have not changed the configuration.
Obviously something did change, but we don't know where to look. Any help
would be appreciated.

Here is a sample error message with the CONTEXT

DBD::Pg::db do failed: ERROR:  INSERT BEFORE jobs
 CONTEXT:  SQL statement "insert into jobs (account_id, resource_id,
system_account_id, local_jobid, local_charge, submit_time, start_time,
end_time, wallduration, jobname, nodecount, processors, queue, grid_job_id)
values ( $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 ,  $10 ,  $11 ,
$12 ,  $13 ,  $14 )"

NOTE:  We are using Perl's DBI (which may or not be the cause).

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: CONTEXT messages for raise EXCEPTION
  2008-02-13 17:27 CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
@ 2008-02-13 19:11 ` Michael Fuhr <mike@fuhr.org>
  2008-02-13 19:25   ` Re: CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
  2008-02-13 19:32   ` Re: CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Michael Fuhr @ 2008-02-13 19:11 UTC (permalink / raw)
  To: Michael Shapiro <mshapiro51@gmail.com>; +Cc: pgsql-admin

On Wed, Feb 13, 2008 at 11:27:16AM -0600, Michael Shapiro wrote:
> I am getting a lot of CONTEXT information along with the message when an
> EXCEPTION is raised. Does anyone know what controls whether EXCEPTIONS add
> the CONTEXT or not?

In the server logs the log_error_verbosity configuration setting
controls how much much detail is logged.  For client-side display,
in psql you can use the VERBOSITY variable.

> NOTE:  We are using Perl's DBI (which may or not be the cause).

For client-side display, see the pg_errorlevel database handle
attribute in the DBD::Pg manual page.

$dbh->{pg_errorlevel} = 0;  # terse
$dbh->{pg_errorlevel} = 1;  # default
$dbh->{pg_errorlevel} = 2;  # verbose

-- 
Michael Fuhr



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: CONTEXT messages for raise EXCEPTION
  2008-02-13 17:27 CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
  2008-02-13 19:11 ` Re: CONTEXT messages for raise EXCEPTION Michael Fuhr <mike@fuhr.org>
@ 2008-02-13 19:25   ` Michael Shapiro <mshapiro51@gmail.com>
  2008-02-13 20:18     ` Re: CONTEXT messages for raise EXCEPTION Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 5+ messages in thread

From: Michael Shapiro @ 2008-02-13 19:25 UTC (permalink / raw)
  To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-admin

The $dbh->{errorlevel} is set to 1 (default), which implies the extra
verbosity is some setting in the server, right?
The server log_error_verbosity is set to terse, so the server shouldn't add
the CONTEXT.

I remain baffled by what I am seeing.


On Feb 13, 2008 1:11 PM, Michael Fuhr <mike@fuhr.org> wrote:

> On Wed, Feb 13, 2008 at 11:27:16AM -0600, Michael Shapiro wrote:
> > I am getting a lot of CONTEXT information along with the message when an
> > EXCEPTION is raised. Does anyone know what controls whether EXCEPTIONS
> add
> > the CONTEXT or not?
>
> In the server logs the log_error_verbosity configuration setting
> controls how much much detail is logged.  For client-side display,
> in psql you can use the VERBOSITY variable.
>
> > NOTE:  We are using Perl's DBI (which may or not be the cause).
>
> For client-side display, see the pg_errorlevel database handle
> attribute in the DBD::Pg manual page.
>
> $dbh->{pg_errorlevel} = 0;  # terse
> $dbh->{pg_errorlevel} = 1;  # default
> $dbh->{pg_errorlevel} = 2;  # verbose
>
> --
> Michael Fuhr
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: CONTEXT messages for raise EXCEPTION
  2008-02-13 17:27 CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
  2008-02-13 19:11 ` Re: CONTEXT messages for raise EXCEPTION Michael Fuhr <mike@fuhr.org>
  2008-02-13 19:25   ` Re: CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
@ 2008-02-13 20:18     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2008-02-13 20:18 UTC (permalink / raw)
  To: Michael Shapiro <mshapiro51@gmail.com>; +Cc: Michael Fuhr <mike@fuhr.org>; pgsql-admin

"Michael Shapiro" <mshapiro51@gmail.com> writes:
> The $dbh->{errorlevel} is set to 1 (default), which implies the extra
> verbosity is some setting in the server, right?
> The server log_error_verbosity is set to terse, so the server shouldn't add
> the CONTEXT.

log_error_verbosity just controls what goes into the server log.

The amount of detail shown on the client side is entirely determined by
client-side logic.  If DBD::Pg hasn't got a knob that lets you suppress
the CONTEXT field, you'll need to take that up with the DBD::Pg authors.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: CONTEXT messages for raise EXCEPTION
  2008-02-13 17:27 CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
  2008-02-13 19:11 ` Re: CONTEXT messages for raise EXCEPTION Michael Fuhr <mike@fuhr.org>
@ 2008-02-13 19:32   ` Michael Shapiro <mshapiro51@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Michael Shapiro @ 2008-02-13 19:32 UTC (permalink / raw)
  To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-admin

I tried setting dbh->{pg_errorlevel} = 0 and 2
Neither setting produced the CONTEXT messages. 0 wasn't any different that
1, and 2 added
LOCATION:  exec_stmt_raise, pl_exec.c:2113


On Feb 13, 2008 1:11 PM, Michael Fuhr <mike@fuhr.org> wrote:

> On Wed, Feb 13, 2008 at 11:27:16AM -0600, Michael Shapiro wrote:
> > I am getting a lot of CONTEXT information along with the message when an
> > EXCEPTION is raised. Does anyone know what controls whether EXCEPTIONS
> add
> > the CONTEXT or not?
>
> In the server logs the log_error_verbosity configuration setting
> controls how much much detail is logged.  For client-side display,
> in psql you can use the VERBOSITY variable.
>
> > NOTE:  We are using Perl's DBI (which may or not be the cause).
>
> For client-side display, see the pg_errorlevel database handle
> attribute in the DBD::Pg manual page.
>
> $dbh->{pg_errorlevel} = 0;  # terse
> $dbh->{pg_errorlevel} = 1;  # default
> $dbh->{pg_errorlevel} = 2;  # verbose
>
> --
> Michael Fuhr
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2008-02-13 20:18 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-13 17:27 CONTEXT messages for raise EXCEPTION Michael Shapiro <mshapiro51@gmail.com>
2008-02-13 19:11 ` Michael Fuhr <mike@fuhr.org>
2008-02-13 19:25   ` Michael Shapiro <mshapiro51@gmail.com>
2008-02-13 20:18     ` Tom Lane <tgl@sss.pgh.pa.us>
2008-02-13 19:32   ` Michael Shapiro <mshapiro51@gmail.com>

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