Re: [GENERAL] log_line_prefix

2013-11-16 Thread hubert depesz lubaczewski
On sob, lis 16, 2013 at 08:44:52 +0530, Jayadevan M wrote:
 I was trying different options of log_line_prefix. I am making chnages,
 doing a pg_ctl reload and checking the output in the log files. For some
 reason ,the changes seem to have no impact. What am I doing wrong? Here is
 the output form the log files where you can see the change being accepted
 (reload) and then the output of a select now().
 2013-11-16 08:24:50.657 IST,,,3186,,5286c0d6.c72,5,,2013-11-16 06:18:22
 IST,,0,LOG,0,received SIGHUP, reloading configuration files,
 2013-11-16 08:24:50.657 IST,,,3186,,5286c0d6.c72,6,,2013-11-16 06:18:22
 IST,,0,LOG,0,parameter log_line_prefix changed to %t
 ,

It looks like you're using csvlog. log_line_prefix is used only for
stderr/syslog logging.

Best regards,

depesz



signature.asc
Description: Digital signature


Re: [GENERAL] log_line_prefix

2013-11-16 Thread Jayadevan
hubert depesz lubaczewski-2 wrote
 It looks like you're using csvlog. log_line_prefix is used only for
 stderr/syslog logging.

Yes, that is right. Thank you.




--
View this message in context: 
http://postgresql.1045698.n5.nabble.com/log-line-prefix-tp5778674p5778688.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] log_line_prefix

2013-11-15 Thread Jayadevan M
Hi,
I was trying different options of log_line_prefix. I am making chnages,
doing a pg_ctl reload and checking the output in the log files. For some
reason ,the changes seem to have no impact. What am I doing wrong? Here is
the output form the log files where you can see the change being accepted
(reload) and then the output of a select now().

2013-11-16 08:24:50.657 IST,,,3186,,5286c0d6.c72,5,,2013-11-16 06:18:22
IST,,0,LOG,0,received SIGHUP, reloading configuration files,
2013-11-16 08:24:50.657 IST,,,3186,,5286c0d6.c72,6,,2013-11-16 06:18:22
IST,,0,LOG,0,parameter log_line_prefix changed to %t
,
2013-11-16 08:24:56.805
IST,postgres,postgres,3460,[local],5286de7e.d84,1,SELECT,2013-11-16
08:24:54 IST,2/0,0,LOG,0,duration: 1.623 ms  statement: select
now();,psql
2013-11-16 08:25:49.376 IST,,,3186,,5286c0d6.c72,7,,2013-11-16 06:18:22
IST,,0,LOG,0,received SIGHUP, reloading configuration files,
2013-11-16 08:25:49.378 IST,,,3186,,5286c0d6.c72,8,,2013-11-16 06:18:22
IST,,0,LOG,0,parameter log_line_prefix changed to %m
,
2013-11-16 08:25:53.384
IST,postgres,postgres,3464,[local],5286deb7.d88,1,SELECT,2013-11-16
08:25:51 IST,2/0,0,LOG,0,duration: 0.978 ms  statement: select
now();,psql
2013-11-16 08:27:28.348 IST,,,3186,,5286c0d6.c72,9,,2013-11-16 06:18:22
IST,,0,LOG,0,received SIGHUP, reloading configuration files,
2013-11-16 08:27:28.349 IST,,,3186,,5286c0d6.c72,10,,2013-11-16 06:18:22
IST,,0,LOG,0,parameter log_line_prefix changed to %m %d %u
,
2013-11-16 08:27:34.681
IST,postgres,postgres,3469,[local],5286df1d.d8d,1,SELECT,2013-11-16
08:27:33 IST,2/0,0,LOG,0,duration: 0.732 ms  statement: select
now();,psql

I think some other setting is printing all the info anyway. But which
setting?

Regards,
Jayadevan


Re: [GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-12-02 Thread Andrus
 That works fine for me... are you sure log_line_prefix is line 482 in your 
 config file? You might have inadvertently put a superfluous % somewhere 
 else.

I use the config file below. I have added only some lines to the end of 
file, all other contents is from windows installer created conf file.
If I remove # sign in front of last line (line 482), and reload 
configuration, I got syntax error
in log file.
Is this Postgres bug ?

Andrus.


# -
# PostgreSQL configuration file
# -
#
# This file consists of lines of the form:
#
#   name = value
#
# (The '=' is optional.)  White space may be used.  Comments are introduced
# with '#' anywhere on a line.  The complete list of option names and
# allowed values can be found in the PostgreSQL documentation.  The
# commented-out settings shown in this file represent the default values.
#
# Please note that re-commenting a setting is NOT sufficient to revert it
# to the default value, unless you restart the server.
#
# Any option can also be given as a command line switch to the server,
# e.g., 'postgres -c log_connections=on'.  Some options can be changed at
# run-time with the 'SET' SQL command.
#
# This file is read on server startup and when the server receives a
# SIGHUP.  If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use pg_ctl reload. Some
# settings, which are marked below, require a server shutdown and restart
# to take effect.
#
# Memory units:  kB = kilobytes MB = megabytes GB = gigabytes
# Time units:ms = milliseconds s = seconds min = minutes h = hours d = 
days


#---
# FILE LOCATIONS
#---

# The default values of these variables are driven from the -D command line
# switch or PGDATA environment variable, represented here as ConfigDir.

#data_directory = 'ConfigDir'  # use data in another directory
 # (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
 # (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
 # (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)'  # write an extra PID file
 # (change requires restart)


#---
# CONNECTIONS AND AUTHENTICATION
#---

# - Connection Settings -

listen_addresses = '*'  # what IP address(es) to listen on;
 # comma-separated list of addresses;
 # defaults to 'localhost', '*' = all
 # (change requires restart)
port = 5432# (change requires restart)
max_connections = 100   # (change requires restart)
# Note: increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).  You
# might also need to raise shared_buffers to support more connections.
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directory = ''  # (change requires restart)
#unix_socket_group = ''   # (change requires restart)
#unix_socket_permissions = 0777  # octal
 # (change requires restart)
#bonjour_name = ''   # defaults to the computer name
 # (change requires restart)

# - Security  Authentication -

#authentication_timeout = 1min  # 1s-600s
#ssl = off# (change requires restart)
#password_encryption = on
#db_user_namespace = off

# Kerberos
#krb_server_keyfile = ''  # (change requires restart)
#krb_srvname = 'postgres'  # (change requires restart)
#krb_server_hostname = ''  # empty string matches any keytab entry
 # (change requires restart)
#krb_caseins_users = off  # (change requires restart)

# - TCP Keepalives -
# see 'man 7 tcp' for details

#tcp_keepalives_idle = 0  # TCP_KEEPIDLE, in seconds;
 # 0 selects the system default
#tcp_keepalives_interval = 0  # TCP_KEEPINTVL, in seconds;
 # 0 selects the system default
#tcp_keepalives_count = 0  # TCP_KEEPCNT;
 # 0 selects the system default


#---
# RESOURCE USAGE (except WAL)
#---

# - Memory -

shared_buffers = 32MB   # min 128kB or max_connections*16kB
 # (change requires restart)
#temp_buffers = 8MB   # min 800kB
#max_prepared_transactions = 5  # can be 0 or more
 # (change requires restart)
# Note: increasing max_prepared_transactions costs ~600 bytes of shared 
memory
# per transaction slot, plus lock space (see max_locks_per_transaction).
#work_mem = 1MB# min 64kB
#maintenance_work_mem = 16MB  # min 1MB
#max_stack_depth = 2MB   # min 100kB

# - Free Space Map -

max_fsm_pages = 204800  # min 

Re: [GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-12-02 Thread Adrian Klaver
On Friday 30 November 2007 2:31 am, Andrus wrote:
  That works fine for me... are you sure log_line_prefix is line 482 in
  your config file? You might have inadvertently put a superfluous %
  somewhere else.

 I use the config file below. I have added only some lines to the end of
 file, all other contents is from windows installer created conf file.
 If I remove # sign in front of last line (line 482), and reload
 configuration, I got syntax error
 in log file.
 Is this Postgres bug ?

 Andrus.





 # - What to Log -

 log_line_prefix = '%t '   # Special values:

 #--
- # CUSTOMIZED OPTIONS
 #--
-

 #custom_variable_classes = ''  # list of custom variable class names

 listen_addresses = '*'
 log_destination = 'stderr'
 redirect_stderr = on
 stats_start_collector = on
 stats_row_level = on
 autovacuum = on
 shared_buffers= 15000   # kui on 1 GB opmälu

 log_min_duration_statement = 2 # millisekundites, -1 on keelatud, 0
 logib kõik
 #log_line_prefix='%t %u %d %h %p %i %l %x '

You have log_line_prefix in two locations, under What to log and CUSTOMIZED 
OPTIONS. I would suggest keeping it under What to log.
-- 
Adrian Klaver
[EMAIL PROTECTED]

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-12-02 Thread Tom Lane
Andrus [EMAIL PROTECTED] writes:
 I use the config file below. I have added only some lines to the end of 
 file, all other contents is from windows installer created conf file.
 If I remove # sign in front of last line (line 482), and reload 
 configuration, I got syntax error
 in log file.
 Is this Postgres bug ?

I still can't duplicate that --- the only way I can get that error is
to leave out the first ' mark.

What PG version are you using?  Back in 8.0 there used to be some odd
corner cases if the last line didn't end with a newline character,
though AFAIR that still wouldn't produce exactly this symptom.

regards, tom lane

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-11-29 Thread Andrus
I added the following line to postgresql.conf file:

log_line_prefix='%t %u %d %h %p %i %l %x '

but got error.

2007-11-29 12:40:41 LOG:  syntax error in file D:/Program 
Files/PostgreSQL/8.2/data/postgresql.conf line 482, near token %


I checked and all options are legal.

What I'm doing wrong ?

Why error message does not show exact information about error ?

Andrus.



---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] log_line_prefix='%t %u %d %h %p %i %l %x ' causes error

2007-11-29 Thread Paul Lambert

Andrus wrote:

log_line_prefix='%t %u %d %h %p %i %l %x '

I checked and all options are legal.



That works fine for me... are you sure log_line_prefix is line 482 in 
your config file? You might have inadvertently put a superfluous % 
somewhere else.


--
Paul Lambert
Database Administrator
AutoLedgers - A Reynolds  Reynolds Company


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster