[DOCS] log_min_duration_statement units

2009-04-06 Thread Bruce Momjian
Someone complained that the default units for log_min_duration_statement
was not mentioned in postgresql.conf;  this applied patch fixes that.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/utils/misc/postgresql.conf.sample
===
RCS file: /cvsroot/pgsql/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.255
diff -c -c -r1.255 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample	6 Apr 2009 18:40:47 -	1.255
--- src/backend/utils/misc/postgresql.conf.sample	6 Apr 2009 18:58:02 -
***
*** 306,312 
  	#   fatal
  	#   panic (effectively off)
  
! #log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
  	# and their durations, > 0 logs only
  	# statements running at least this time.
  
--- 306,312 
  	#   fatal
  	#   panic (effectively off)
  
! #log_min_duration_statement = -1ms	# -1 is disabled, 0 logs all statements
  	# and their durations, > 0 logs only
  	# statements running at least this time.
  

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] Update postgresql.conf units display

2009-04-06 Thread Bruce Momjian
I have applied the attached patch to display the units options in
postgresql.conf more clearly.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: postgresql.conf.sample
===
RCS file: /cvsroot/pgsql/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.254
retrieving revision 1.255
diff -c -c -r1.254 -r1.255
*** postgresql.conf.sample	28 Feb 2009 00:10:52 -	1.254
--- postgresql.conf.sample	6 Apr 2009 18:40:47 -	1.255
***
*** 24,31 
  # "postgres -c log_connections=on".  Some parameters can be changed at run time
  # with the "SET" SQL command.
  #
! # Memory units:  kB = kilobytes MB = megabytes GB = gigabytes
! # Time units:ms = milliseconds s = seconds min = minutes h = hours d = days
  
  
  #--
--- 24,34 
  # "postgres -c log_connections=on".  Some parameters can be changed at run time
  # with the "SET" SQL command.
  #
! # Memory units:  kB = kilobytes  Time units:  ms = milliseconds
! #MB = megabytes   s = seconds
! #GB = gigabytes   min = minutes
! # h = hours
! # d = days
  
  
  #--

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Tom Lane
Bruce Momjian  writes:
> ! #log_min_duration_statement = -1# -1 is disabled, 0 logs all statements
  
> ! #log_min_duration_statement = -1ms  # -1 is disabled, 0 logs all statements

This is not sensible -- there are no units for the "-1" setting.  I
seem to recall that it won't even work; did you test uncommenting that?

regards, tom lane

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Bruce Momjian
Tom Lane wrote:
> Bruce Momjian  writes:
> > ! #log_min_duration_statement = -1  # -1 is disabled, 0 logs all statements
>   
> > ! #log_min_duration_statement = -1ms# -1 is disabled, 0 logs all 
> > statements
> 
> This is not sensible -- there are no units for the "-1" setting.  I
> seem to recall that it won't even work; did you test uncommenting that?

I tested it uncommented and manually and it worked fine:

test=> set log_min_duration_statement = '-1ms';
SET
test=> show log_min_duration_statement;
 log_min_duration_statement

 -1
(1 row)

It seems illogical to document it this way but a non-EDB trainer emailed
me saying students are getting confused about the default units, and I
can see how they would get confused.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Euler Taveira de Oliveira

Bruce Momjian escreveu:

Someone complained that the default units for log_min_duration_statement
was not mentioned in postgresql.conf;  this applied patch fixes that.

IMHO -1ms doesn't make much sense. Also, some other parameters don't have 
units too. They are: archive_timeout, autovacuum_vacuum_cost_delay, 
log_autovacuum_min_duration, log_temp_files, statement_timeout, 
tcp_keepalives_idle, and tcp_keepalives_interval. What about mention the unit 
in the comment that follows it? The last two already have it.



--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Tom Lane
Bruce Momjian  writes:
> It seems illogical to document it this way

Yeah, that's what I thought, so why did you do it that way?
You could do something like

#log_min_duration_statement = -1# -1 is disabled, 0 logs all statements
# default unit is ms


regards, tom lane

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Bruce Momjian
Euler Taveira de Oliveira wrote:
> Bruce Momjian escreveu:
> > Someone complained that the default units for log_min_duration_statement
> > was not mentioned in postgresql.conf;  this applied patch fixes that.
> > 
> IMHO -1ms doesn't make much sense. Also, some other parameters don't have 
> units too. They are: archive_timeout, autovacuum_vacuum_cost_delay, 
> log_autovacuum_min_duration, log_temp_files, statement_timeout, 
> tcp_keepalives_idle, and tcp_keepalives_interval. What about mention the unit 
> in the comment that follows it? The last two already have it.

Thanks for the list!  Here is an applied patch that cleans these up,
plus fixes log_min_duration_statement.
-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Bruce Momjian
Bruce Momjian wrote:
> Euler Taveira de Oliveira wrote:
> > Bruce Momjian escreveu:
> > > Someone complained that the default units for log_min_duration_statement
> > > was not mentioned in postgresql.conf;  this applied patch fixes that.
> > > 
> > IMHO -1ms doesn't make much sense. Also, some other parameters don't have 
> > units too. They are: archive_timeout, autovacuum_vacuum_cost_delay, 
> > log_autovacuum_min_duration, log_temp_files, statement_timeout, 
> > tcp_keepalives_idle, and tcp_keepalives_interval. What about mention the 
> > unit 
> > in the comment that follows it? The last two already have it.
> 
> Thanks for the list!  Here is an applied patch that cleans these up,
> plus fixes log_min_duration_statement.

Oops, here is the patch;  Euler, would you look to see if you can find
anything else missing;  you seem to be good at that.  :-)

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/utils/misc/guc.c
===
RCS file: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.499
diff -c -c -r1.499 guc.c
*** src/backend/utils/misc/guc.c	2 Apr 2009 19:57:19 -	1.499
--- src/backend/utils/misc/guc.c	6 Apr 2009 20:56:57 -
***
*** 1530,1536 
  
  	{
  		{"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
! 			gettext_noop("Sets the maximum allowed duration of any statement."),
  			gettext_noop("A value of 0 turns off the timeout."),
  			GUC_UNIT_MS
  		},
--- 1530,1536 
  
  	{
  		{"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
! 			gettext_noop("Sets the maximum duration of any statement, in milliseconds."),
  			gettext_noop("A value of 0 turns off the timeout."),
  			GUC_UNIT_MS
  		},
***
*** 1684,1690 
  
  	{
  		{"log_autovacuum_min_duration", PGC_SIGHUP, LOGGING_WHAT,
! 			gettext_noop("Sets the minimum execution time above which "
  		 "autovacuum actions will be logged."),
  			gettext_noop("Zero prints all actions. -1 turns autovacuum logging off."),
  			GUC_UNIT_MS
--- 1684,1690 
  
  	{
  		{"log_autovacuum_min_duration", PGC_SIGHUP, LOGGING_WHAT,
! 			gettext_noop("Sets the minimum execution milliseconds above which "
  		 "autovacuum actions will be logged."),
  			gettext_noop("Zero prints all actions. -1 turns autovacuum logging off."),
  			GUC_UNIT_MS
***
*** 1871,1877 
  
  	{
  		{"tcp_keepalives_idle", PGC_USERSET, CLIENT_CONN_OTHER,
! 			gettext_noop("Time between issuing TCP keepalives."),
  			gettext_noop("A value of 0 uses the system default."),
  			GUC_UNIT_S
  		},
--- 1871,1877 
  
  	{
  		{"tcp_keepalives_idle", PGC_USERSET, CLIENT_CONN_OTHER,
! 			gettext_noop("Seconds between issuing TCP keepalives."),
  			gettext_noop("A value of 0 uses the system default."),
  			GUC_UNIT_S
  		},
***
*** 1881,1887 
  
  	{
  		{"tcp_keepalives_interval", PGC_USERSET, CLIENT_CONN_OTHER,
! 			gettext_noop("Time between TCP keepalive retransmits."),
  			gettext_noop("A value of 0 uses the system default."),
  			GUC_UNIT_S
  		},
--- 1881,1887 
  
  	{
  		{"tcp_keepalives_interval", PGC_USERSET, CLIENT_CONN_OTHER,
! 			gettext_noop("Seconds between TCP keepalive retransmits."),
  			gettext_noop("A value of 0 uses the system default."),
  			GUC_UNIT_S
  		},
Index: src/backend/utils/misc/postgresql.conf.sample
===
RCS file: /cvsroot/pgsql/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.257
diff -c -c -r1.257 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample	6 Apr 2009 19:03:04 -	1.257
--- src/backend/utils/misc/postgresql.conf.sample	6 Apr 2009 20:56:57 -
***
*** 122,128 
  
  # - Cost-Based Vacuum Delay -
  
! #vacuum_cost_delay = 0			# 0-100 milliseconds
  #vacuum_cost_page_hit = 1		# 0-1 credits
  #vacuum_cost_page_miss = 10		# 0-1 credits
  #vacuum_cost_page_dirty = 20		# 0-1 credits
--- 122,128 
  
  # - Cost-Based Vacuum Delay -
  
! #vacuum_cost_delay = 0ms		# 0-100 milliseconds
  #vacuum_cost_page_hit = 1		# 0-1 credits
  #vacuum_cost_page_miss = 10		# 0-1 credits
  #vacuum_cost_page_dirty = 20		# 0-1 credits
***
*** 175,181 
  # (change requires restart)
  #archive_command = ''		# command to use to archive a logfile segment
  #archive_timeout = 0		# force a logfile segment switch after this
! # time; 0 is off
  
  
  #--
--- 175,181 
  # (change requires restart)
  #archive_command = ''		# command to use to archive a logfile segment
  #archive_timeout = 0		# force a logfile segment switch after this
! # number of seconds; 0 is off
  
  
  #---

Re: [DOCS] log_min_duration_statement units

2009-04-06 Thread Euler Taveira de Oliveira

Bruce Momjian escreveu:

Oops, here is the patch;  Euler, would you look to see if you can find
anything else missing;  you seem to be good at that.  :-)

My English is not as good as yours but here is another try. Personally, I 
prefer the second one but...



--
  Euler Taveira de Oliveira
  http://www.timbira.com/


param.diff.gz
Description: GNU Zip compressed data


param2.diff.gz
Description: GNU Zip compressed data

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


[DOCS] FAQ future

2009-04-06 Thread Bruce Momjian
Now that the main FAQ is on the wiki, what are we doing with the FAQ in
CVS?  Remove it?  What about the language-speicific ones?

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

-- 
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] FAQ future

2009-04-06 Thread Euler Taveira de Oliveira

Bruce Momjian escreveu:

Now that the main FAQ is on the wiki, what are we doing with the FAQ in
CVS?  Remove it?  What about the language-speicific ones?

+1. IIRC, Alvaro asked the authors to move it to wiki; and, some of them [1] 
are already there. Let's give some more time (8.4RC1?) before removing them 
from CVS.


[1] http://wiki.postgresql.org/wiki/FAQ/pt


--
  Euler Taveira de Oliveira
  http://www.timbira.com/

--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs


Re: [DOCS] FAQ future

2009-04-06 Thread Magnus Hagander
On 7 apr 2009, at 07.04, Euler Taveira de Oliveira   
wrote:



Bruce Momjian escreveu:
Now that the main FAQ is on the wiki, what are we doing with the  
FAQ in

CVS?  Remove it?  What about the language-speicific ones?
+1. IIRC, Alvaro asked the authors to move it to wiki; and, some of  
them [1] are already there. Let's give some more time (8.4RC1?)  
before removing them from CVS.




Yes, let's remove them.

Let's remove the main one now, ao there is just one source.

I'd like to see the others moved before beta, but we can't really  
remove them until they are up on the wiki ;)


/Magnus


--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs