Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: reindexdb command utlility



> I used wanted to point out the the ( -q, --quiet ) parameter for  
> reindexdb command utility does not work.
Actually it is *not* a bug. The NOTICE is printed by the REINDEX
command; reindexdb is just a wrapper around REINDEX command. If you
set up 'client_min_messages' in postgresql.conf, you don't get those
'annoying' messages.

> Also reindexdb writes NOTICE to standard err for every table it  
> reindexes which makes it really hard to use in script as it always  
> produces an "errror".  :-)
> 
You can always ignore NOTICE. grep is your friend. :-)

Looking at the code, IMHO we could raise the ereport from NOTICE to
INFO (see the patch attached). None of the scripts actually raise
NOTICEs if it succeeds.

Comments?


-- 
  Euler Taveira de Oliveira
  http://www.timbira.com/
Index: src/backend/commands/indexcmds.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/commands/indexcmds.c,v
retrieving revision 1.139
diff -c -r1.139 indexcmds.c
*** src/backend/commands/indexcmds.c	10 May 2006 23:18:39 -0000	1.139
--- src/backend/commands/indexcmds.c	31 May 2006 01:28:49 -0000
***************
*** 1108,1114 ****
  		/* functions in indexes may want a snapshot set */
  		ActiveSnapshot = CopySnapshot(GetTransactionSnapshot());
  		if (reindex_relation(relid, true))
! 			ereport(NOTICE,
  					(errmsg("table \"%s\" was reindexed",
  							get_rel_name(relid))));
  		CommitTransactionCommand();
--- 1108,1114 ----
  		/* functions in indexes may want a snapshot set */
  		ActiveSnapshot = CopySnapshot(GetTransactionSnapshot());
  		if (reindex_relation(relid, true))
! 			ereport(INFO,
  					(errmsg("table \"%s\" was reindexed",
  							get_rel_name(relid))));
  		CommitTransactionCommand();


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group