pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logging issue
4+ messages / 2 participants
[nested] [flat]

* Logging issue
@ 2011-06-15 13:58  Campbell, Lance <lance@illinois.edu>
  0 siblings, 0 replies; 4+ messages in thread

From: Campbell, Lance @ 2011-06-15 13:58 UTC (permalink / raw)
  To: pgsql-admin

I just upgraded to PostgreSQL 9.0.2.  I was told there was a change made to logging in this version such that when a prepared statement is executed and there is an error instead of seeing $# in the SQL logs you would see the actual values.  I am still seeing the $# not the values.  Is there some other setting I needed to have set in order to see the values in the SQL?

Thanks,

Lance

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

* logging issue
@ 2012-03-06 21:04  Campbell, Lance <lance@illinois.edu>
  0 siblings, 1 reply; 4+ messages in thread

From: Campbell, Lance @ 2012-03-06 21:04 UTC (permalink / raw)
  To: pgsql-admin

PostgreSQL 9.1.3

I just moved our test database from PostgreSQL 9.0 to 9.1.  I also changed my log settings.   I am seeing every single SQL statement that PostgreSQL performs by my Java applications.  Is there some way to only display the details when there is an error?  I would assume yes.  But for some reason I am getting all SQL statements.  I just want the errors.  I have included below my settings for the logging section.  Any help would be greatly appreciated.  Thanks!

#------------------------------------------------------------------------------
# ERROR REPORTING AND LOGGING
#------------------------------------------------------------------------------

# - Where to Log -

#log_destination = 'stderr'             # Valid values are combinations of

logging_collector = on          # Enable capturing of stderr and csvlog

#log_directory = 'pg_log'               # directory where log files are written,

log_filename = 'postgresql-9_1-%a.log'  # log file name pattern,

#log_file_mode = 0600                   # creation mode for log files,

log_truncate_on_rotation = on           # If on, an existing log file with the

#log_rotation_age = 1d                  # Automatic rotation of logfiles will

log_rotation_size = 50MB                # Automatic rotation of logfiles will

#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
#silent_mode = off                      # Run server silently.
#client_min_messages = notice           # values in order of decreasing detail:
#log_min_messages = warning             # values in order of decreasing detail:
#log_min_error_statement = error        # values in order of decreasing detail:
#log_min_duration_statement = -1        # -1 is disabled, 0 logs all statements

#debug_print_parse = off
#debug_print_rewritten = off
#debug_print_plan = off
#debug_pretty_print = on
#log_checkpoints = off
#log_connections = off
#log_disconnections = off
#log_duration = off
#log_error_verbosity = default          # terse, default, or verbose messages
#log_hostname = off

log_line_prefix = '%u::%t '                     # special values:

#log_lock_waits = off                   # log lock waits >= deadlock_timeout

log_statement = 'all'                   # none, ddl, mod, all

#log_temp_files = -1                    # log temporary files equal or larger
#log_timezone = '(defaults to server environment setting)'


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382

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

* Re: logging issue
@ 2012-03-06 21:43  Jerry Sievers <gsievers19@comcast.net>
  parent: Campbell, Lance <lance@illinois.edu>
  0 siblings, 1 reply; 4+ messages in thread

From: Jerry Sievers @ 2012-03-06 21:43 UTC (permalink / raw)
  To: Campbell\, Lance <lance@illinois.edu>; +Cc: pgsql-admin

"Campbell, Lance" <lance@illinois.edu> writes:

> PostgreSQL 9.1.3
>
> I just moved our test database from PostgreSQL 9.0 to 9.1.  I also
> changed my log settings.  I am seeing every single SQL statement
> that PostgreSQL performs by my Java applications.  Is there some way
> to only display the details when there is an error?  I would assume
> yes.  But for some reason I am getting all SQL statements.  I just
> want the errors.  I have included below my settings for the logging
> section.  Any help would be greatly appreciated.  Thanks!
>
Change log_statement to 'none' and pg_ctl reload the server. 

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 305.321.1144



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

* Re: logging issue
@ 2012-03-07 18:28  Campbell, Lance <lance@illinois.edu>
  parent: Jerry Sievers <gsievers19@comcast.net>
  0 siblings, 0 replies; 4+ messages in thread

From: Campbell, Lance @ 2012-03-07 18:28 UTC (permalink / raw)
  To: Jerry Sievers <gsievers19@comcast.net>; +Cc: pgsql-admin

Thanks so much for the response.  Logging works great.  

Many thanks to the PostgreSQL development team for building such a wonderful database.  9.1 is working great.

Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382


-----Original Message-----
From: Jerry Sievers [mailto:gsievers19@comcast.net] 
Sent: Tuesday, March 06, 2012 3:43 PM
To: Campbell, Lance
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] logging issue

"Campbell, Lance" <lance@illinois.edu> writes:

> PostgreSQL 9.1.3
>
> I just moved our test database from PostgreSQL 9.0 to 9.1.  I also 
> changed my log settings.  I am seeing every single SQL statement that 
> PostgreSQL performs by my Java applications.  Is there some way to 
> only display the details when there is an error?  I would assume yes.  
> But for some reason I am getting all SQL statements.  I just want the 
> errors.  I have included below my settings for the logging section.  
> Any help would be greatly appreciated.  Thanks!
>
Change log_statement to 'none' and pg_ctl reload the server. 

--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 305.321.1144



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


end of thread, other threads:[~2012-03-07 18:28 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-06-15 13:58 Logging issue Campbell, Lance <lance@illinois.edu>
2012-03-06 21:04 logging issue Campbell, Lance <lance@illinois.edu>
2012-03-06 21:43 ` Re: logging issue Jerry Sievers <gsievers19@comcast.net>
2012-03-07 18:28   ` Re: logging issue Campbell, Lance <lance@illinois.edu>

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