Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-02-09 Thread Bryce Nesbitt




Apologies. Turns out the name of the relevant setting was changed for
8.3! So a revised patch is attached.

For backing, see:
http://www.postgresql.org/docs/8.3/static/release-8-3.html
" Numerous changes in administrative server parameters...
stats_block_level and stats_row_level are merged into track_counts."


Bruce Momjian wrote:

  Bryce Nesbitt wrote:
  
  
This is a proposed patch to document disabling the statistics collector 
pg_dump activity, and give a bit more visibility to the PGOPTIONS 
environment variable supported by libpq.

It is an alternative to the prior patch, which supplied a --no-stats flag.

This is a documentation only patch, not tied to a recent code change.

  
  
Patch applied, with spelling correction already noted.
  




Index: pg_dump.c
===
RCS file: /projects/cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.514
diff -c -2 -r1.514 pg_dump.c
*** pg_dump.c	18 Jan 2009 20:44:45 -	1.514
--- pg_dump.c	20 Jan 2009 20:47:25 -
***
*** 236,239 
--- 236,240 
  	static int  outputNoTablespaces = 0;
  	static int	use_setsessauth = 0;
+ 	static int  noStatsCollection = 0;
  
  	static struct option long_options[] = {
***
*** 278,281 
--- 279,283 
  		{role, required_argument, NULL, 3},
  		{use-set-session-authorization, no_argument, use_setsessauth, 1},
+ 		{no-stats, no_argument, noStatsCollection, 1},
  
  		{NULL, 0, NULL, 0}
***
*** 430,433 
--- 432,437 
  else if (strcmp(optarg, no-tablespaces) == 0)
  	outputNoTablespaces = 1;
+ else if (strcmp(optarg, no-stats) == 0)
+ 	noStatsCollection = 1;
  else if (strcmp(optarg, use-set-session-authorization) == 0)
  	use_setsessauth = 1;
***
*** 613,616 
--- 617,629 
  		do_sql_command(g_conn, SET statement_timeout = 0);
  
+	/* 
+	 * Disable collection of statistics.  pg_dump's activity may be very different
+	 * from what you are trying to analyze in the stats tables.
+	 */
+ 	if( noStatsCollection ) {
+ 		do_sql_command(g_conn, SET stats_block_level = false);
+ 		do_sql_command(g_conn, SET stats_row_level   = false);
+ 	}
+ 
  	/*
  	 * Start serializable transaction to dump consistent data.
***
*** 833,836 
--- 846,850 
  	printf(_(  -U, --username=NAME  connect as specified database user\n));
  	printf(_(  -W, --password   force password prompt (should happen automatically)\n));
+ 	printf(_(  --no-stats   disable statistics collection (superuser only)\n));
  
  	printf(_(\nIf no database name is supplied, then the PGDATABASE environment\n

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-02-09 Thread Bruce Momjian
Apologies.  Turns out the name of the relevant setting was changed
 for 8.3! So a revised patch is attached.
For backing, see:
http://www.postgresql.org/docs/8.3/static/release-8-3.html
 Numerous changes in administrative server parameters...
stats_block_level and stats_row_level are merged into track_counts.
 Bryce Nesbitt wrote:

We don't want a pg_dump flag;  the doc mention is good enough.

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

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

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-02-09 Thread Bryce Nesbitt




Bruce Momjian wrote:

  
   Apologies.  Turns out the name of the relevant setting was changed
for 8.3! So a revised patch is attached.
   For backing, see:
   http://www.postgresql.org/docs/8.3/static/release-8-3.html
   " Numerous changes in administrative server parameters...
   stats_block_level and stats_row_level are merged into track_counts."
Bryce Nesbitt wrote:

  
  
We don't want a pg_dump flag;  the doc mention is good enough.
  

Doh! Try this one instead. Postgres 8.3 changed the name of the flag
mentioned in the doc.





Index: ref/pg_dump.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v
retrieving revision 1.108
diff -c -2 -r1.108 pg_dump.sgml
*** ref/pg_dump.sgml	7 Feb 2009 15:25:51 -	1.108
--- ref/pg_dump.sgml	9 Feb 2009 20:19:48 -
***
*** 760,773 
 library will apply.
/para
para
!The database activity of applicationpg_dump/application is
!normally collected by the statistics collector.  If this is
!undesirable, you can set parameters literalstats_block_level/literal
!and literalstats_row_level/literal to false via the
!applicationlibpq/ envarPGOPTIONS/envar environment variable,
!or via literalALTER USER/literal.
/para
  
- 
   /refsect1
  
--- 760,772 
 library will apply.
/para
+ 
para
!The database activity of applicationpg_dump/application is normally collected by the
!statistics collector.  If this is undesirable, you can set parameter
!literaltrack_counts/literal to false via envarPGOPTIONS/envar
!or the literalALTER USER/literal command. For versions prior to 8.3, set
!literalstats_block_level/literal and literalstats_row_level/literal instead.
/para
  
   /refsect1
  

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-02-09 Thread Bruce Momjian
 We don't want a pg_dump flag;  the doc mention is good enough.
 
 
Doh!  Try this one instead.  Postgres 8.3 changed the name of the
 flag mentioned in the doc.

[  Please avoid html-only email.]

OK, patch applied, but I removed the mention of pre-8.3 because this is
going only in the 8.4 docs.

Thanks.

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

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

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-02-07 Thread Bruce Momjian
Bryce Nesbitt wrote:
 This is a proposed patch to document disabling the statistics collector 
 pg_dump activity, and give a bit more visibility to the PGOPTIONS 
 environment variable supported by libpq.
 
 It is an alternative to the prior patch, which supplied a --no-stats flag.
 
 This is a documentation only patch, not tied to a recent code change.

Patch applied, with spelling correction already noted.

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

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

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception (REVISED PATCH)

2009-02-07 Thread Bruce Momjian
Josh Berkus wrote:
 Euler Taveira de Oliveira wrote:
  Bryce Nesbitt escreveu:
  Here's a revision (thanks Robert Treat for the spelling corrextion).
  If there are no other objections, how do I nominate it for consideration?
 
  Added to next commit fest [1].
 
 Um, not necessary.  We're still accepting new doc patches, and will 
 until the end of beta.

Yep, patch commited, removed from next commit fest.

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

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

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception (REVISED PATCH)

2009-01-23 Thread Bryce Nesbitt

Here's a revision (thanks Robert Treat for the spelling corrextion).
If there are no other objections, how do I nominate it for consideration?
 -Bryce

Index: pg_dump.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v
retrieving revision 1.106
diff -c -2 -r1.106 pg_dump.sgml
*** pg_dump.sgml	5 Jan 2009 16:54:36 -	1.106
--- pg_dump.sgml	23 Jan 2009 20:57:36 -
***
*** 727,733 
  termenvarPGDATABASE/envar/term
  termenvarPGHOST/envar/term
  termenvarPGPORT/envar/term
- termenvarPGUSER/envar/term
  
  listitem
   para
--- 727,734 
  termenvarPGDATABASE/envar/term
  termenvarPGHOST/envar/term
+ termenvarPGOPTIONS/envar/term
  termenvarPGPORT/envar/term
  
+ termenvarPGUSER/envar/term
  listitem
   para
***
*** 735,738 
--- 736,740 
   /para
  /listitem
+ 
 /varlistentry
/variablelist
***
*** 758,761 
--- 760,772 
 library will apply.
/para
+   para
+The database activity of applicationpg_dump/application is normally collected by the
+statistics collector.  If this is undesirable, you can set parameters
+literalstats_block_level/literal and literalstats_row_level/literal to false
+via the applicationlibpq/application envarPGOPTIONS/envar environment variable,
+or via literalALTER USER/literal.
+   /para
+ 
+ 
   /refsect1
  
Index: pg_dumpall.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_dumpall.sgml,v
retrieving revision 1.74
diff -c -2 -r1.74 pg_dumpall.sgml
*** pg_dumpall.sgml	5 Jan 2009 16:54:36 -	1.74
--- pg_dumpall.sgml	23 Jan 2009 20:57:36 -
***
*** 446,449 
--- 446,450 
 varlistentry
  termenvarPGHOST/envar/term
+ termenvarPGOPTIONS/envar/term
  termenvarPGPORT/envar/term
  termenvarPGUSER/envar/term
Index: pg_restore.sgml
===
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/ref/pg_restore.sgml,v
retrieving revision 1.77
diff -c -2 -r1.77 pg_restore.sgml
*** pg_restore.sgml	5 Jan 2009 16:54:36 -	1.77
--- pg_restore.sgml	23 Jan 2009 20:57:36 -
***
*** 538,541 
--- 538,542 
 varlistentry
  termenvarPGHOST/envar/term
+ termenvarPGOPTIONS/envar/term
  termenvarPGPORT/envar/term
  termenvarPGUSER/envar/term

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception (REVISED PATCH)

2009-01-23 Thread Josh Berkus

Bryce Nesbitt wrote:

Here's a revision (thanks Robert Treat for the spelling corrextion).
If there are no other objections, how do I nominate it for consideration?
 -Bryce


You already have.

Mind you, in the future when you're not continuing a discussion from a 
code patch, you should submit doc patches to pgsql-docs.  But I'm sure 
Peter has seen it here.


--Josh


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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception (REVISED PATCH)

2009-01-23 Thread Euler Taveira de Oliveira
Bryce Nesbitt escreveu:
 Here's a revision (thanks Robert Treat for the spelling corrextion).
 If there are no other objections, how do I nominate it for consideration?
 
Added to next commit fest [1].

[1] http://wiki.postgresql.org/wiki/CommitFest_2009-First


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

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception (REVISED PATCH)

2009-01-23 Thread Josh Berkus

Euler Taveira de Oliveira wrote:

Bryce Nesbitt escreveu:

Here's a revision (thanks Robert Treat for the spelling corrextion).
If there are no other objections, how do I nominate it for consideration?


Added to next commit fest [1].


Um, not necessary.  We're still accepting new doc patches, and will 
until the end of beta.


--Josh


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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-01-20 Thread Robert Treat
On Tuesday 20 January 2009 20:22:10 Bryce Nesbitt wrote:
 This is a proposed patch to document disabling the statistics collector
 pg_dump activity, and give a bit more visibility to the PGOPTIONS
 environment variable supported by libpq.

 It is an alternative to the prior patch, which supplied a --no-stats flag.

 This is a documentation only patch, not tied to a recent code change.

s/varriable/variable/g

also, I forget which way is proper, but you're inconsistent with your closing 
tags for application in that paragraph (using both /application and /)  

-- 
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com

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


Re: [HACKERS] New pg_dump patch -- document statistics collector exception

2009-01-20 Thread Alvaro Herrera
Robert Treat wrote:

 also, I forget which way is proper, but you're inconsistent with your closing 
 tags for application in that paragraph (using both /application and /)  

They're both acceptable.

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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