mirror of
				https://github.com/postgres/postgres.git
				synced 2025-10-31 00:03:57 -04:00 
			
		
		
		
	Update docs for new INFO, NOTICE, WARNING elog() levels.
This commit is contained in:
		
							parent
							
								
									4e15b9233d
								
							
						
					
					
						commit
						92b1ab75d4
					
				| @ -1,5 +1,5 @@ | |||||||
| <!-- | <!-- | ||||||
| $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.11 2002/01/20 22:19:56 petere Exp $ | $Header: /cvsroot/pgsql/doc/src/sgml/maintenance.sgml,v 1.12 2002/03/06 06:44:31 momjian Exp $ | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
| <chapter id="maintenance"> | <chapter id="maintenance"> | ||||||
| @ -335,7 +335,7 @@ SELECT datname, age(datfrozenxid) FROM pg_database; | |||||||
|     <informalexample> |     <informalexample> | ||||||
| <programlisting> | <programlisting> | ||||||
| play=# vacuum; | play=# vacuum; | ||||||
| NOTICE:  Some databases have not been vacuumed in 1613770184 transactions. | WARNING:  Some databases have not been vacuumed in 1613770184 transactions. | ||||||
|         Better vacuum them within 533713463 transactions, |         Better vacuum them within 533713463 transactions, | ||||||
|         or you may have a wraparound failure. |         or you may have a wraparound failure. | ||||||
| VACUUM | VACUUM | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <!-- | <!-- | ||||||
| $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.16 2002/01/20 22:19:56 petere Exp $ | $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.17 2002/03/06 06:44:31 momjian Exp $ | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
|  <chapter id="performance-tips"> |  <chapter id="performance-tips"> | ||||||
| @ -96,7 +96,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/perform.sgml,v 1.16 2002/01/20 22:19:56 pet | |||||||
| 
 | 
 | ||||||
|     <programlisting> |     <programlisting> | ||||||
| regression=# EXPLAIN SELECT * FROM tenk1; | regression=# EXPLAIN SELECT * FROM tenk1; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Seq Scan on tenk1  (cost=0.00..333.00 rows=10000 width=148) | Seq Scan on tenk1  (cost=0.00..333.00 rows=10000 width=148) | ||||||
|     </programlisting> |     </programlisting> | ||||||
| @ -120,7 +120,7 @@ SELECT * FROM pg_class WHERE relname = 'tenk1'; | |||||||
| 
 | 
 | ||||||
|     <programlisting> |     <programlisting> | ||||||
| regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 1000; | regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 1000; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Seq Scan on tenk1  (cost=0.00..358.00 rows=1007 width=148) | Seq Scan on tenk1  (cost=0.00..358.00 rows=1007 width=148) | ||||||
|     </programlisting> |     </programlisting> | ||||||
| @ -145,7 +145,7 @@ Seq Scan on tenk1  (cost=0.00..358.00 rows=1007 width=148) | |||||||
| 
 | 
 | ||||||
|     <programlisting> |     <programlisting> | ||||||
| regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 50; | regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 50; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Index Scan using tenk1_unique1 on tenk1  (cost=0.00..181.09 rows=49 width=148) | Index Scan using tenk1_unique1 on tenk1  (cost=0.00..181.09 rows=49 width=148) | ||||||
|     </programlisting> |     </programlisting> | ||||||
| @ -164,7 +164,7 @@ Index Scan using tenk1_unique1 on tenk1  (cost=0.00..181.09 rows=49 width=148) | |||||||
|     <programlisting> |     <programlisting> | ||||||
| regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 50 AND | regression=# EXPLAIN SELECT * FROM tenk1 WHERE unique1 < 50 AND | ||||||
| regression-# stringu1 = 'xxx'; | regression-# stringu1 = 'xxx'; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Index Scan using tenk1_unique1 on tenk1  (cost=0.00..181.22 rows=1 width=148) | Index Scan using tenk1_unique1 on tenk1  (cost=0.00..181.22 rows=1 width=148) | ||||||
|     </programlisting> |     </programlisting> | ||||||
| @ -179,7 +179,7 @@ Index Scan using tenk1_unique1 on tenk1  (cost=0.00..181.22 rows=1 width=148) | |||||||
|     <programlisting> |     <programlisting> | ||||||
| regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 50 | regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 50 | ||||||
| regression-# AND t1.unique2 = t2.unique2; | regression-# AND t1.unique2 = t2.unique2; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Nested Loop  (cost=0.00..330.41 rows=49 width=296) | Nested Loop  (cost=0.00..330.41 rows=49 width=296) | ||||||
|   ->  Index Scan using tenk1_unique1 on tenk1 t1 |   ->  Index Scan using tenk1_unique1 on tenk1 t1 | ||||||
| @ -227,7 +227,7 @@ regression=# set enable_nestloop = off; | |||||||
| SET VARIABLE | SET VARIABLE | ||||||
| regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 50 | regression=# EXPLAIN SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 < 50 | ||||||
| regression-# AND t1.unique2 = t2.unique2; | regression-# AND t1.unique2 = t2.unique2; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Hash Join  (cost=181.22..564.83 rows=49 width=296) | Hash Join  (cost=181.22..564.83 rows=49 width=296) | ||||||
|   ->  Seq Scan on tenk2 t2 |   ->  Seq Scan on tenk2 t2 | ||||||
| @ -260,7 +260,7 @@ Hash Join  (cost=181.22..564.83 rows=49 width=296) | |||||||
| regression=# EXPLAIN ANALYZE | regression=# EXPLAIN ANALYZE | ||||||
| regression-# SELECT * FROM tenk1 t1, tenk2 t2 | regression-# SELECT * FROM tenk1 t1, tenk2 t2 | ||||||
| regression-# WHERE t1.unique1 < 50 AND t1.unique2 = t2.unique2; | regression-# WHERE t1.unique1 < 50 AND t1.unique2 = t2.unique2; | ||||||
| NOTICE:  QUERY PLAN: | INFO:  QUERY PLAN: | ||||||
| 
 | 
 | ||||||
| Nested Loop  (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows=50 loops=1) | Nested Loop  (cost=0.00..330.41 rows=49 width=296) (actual time=1.31..28.90 rows=50 loops=1) | ||||||
|   ->  Index Scan using tenk1_unique1 on tenk1 t1 |   ->  Index Scan using tenk1_unique1 on tenk1 t1 | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <!-- | <!-- | ||||||
| $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.105 2002/03/02 21:39:15 momjian Exp $ | $Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.106 2002/03/06 06:44:32 momjian Exp $ | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
| <Chapter Id="runtime"> | <Chapter Id="runtime"> | ||||||
| @ -139,13 +139,13 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput> | |||||||
|    One surprise you might encounter while running <command>initdb</command> is |    One surprise you might encounter while running <command>initdb</command> is | ||||||
|    a notice similar to this one: |    a notice similar to this one: | ||||||
| <screen> | <screen> | ||||||
| NOTICE:  Initializing database with en_US collation order. | WARNING:  Initializing database with en_US collation order. | ||||||
|         This locale setting will prevent use of index optimization for |         This locale setting will prevent use of index optimization for | ||||||
|         LIKE and regexp searches.  If you are concerned about speed of |         LIKE and regexp searches.  If you are concerned about speed of | ||||||
|         such queries, you may wish to set LC_COLLATE to "C" and |         such queries, you may wish to set LC_COLLATE to "C" and | ||||||
|         re-initdb.  For more information see the Administrator's Guide. |         re-initdb.  For more information see the Administrator's Guide. | ||||||
| </screen> | </screen> | ||||||
|    This notice is intended to warn you that the currently selected locale |    This is intended to warn you that the currently selected locale | ||||||
|    will cause indexes to be sorted in an order that prevents them from |    will cause indexes to be sorted in an order that prevents them from | ||||||
|    being used for LIKE and regular-expression searches.  If you need |    being used for LIKE and regular-expression searches.  If you need | ||||||
|    good performance of such searches, you should set your current locale |    good performance of such searches, you should set your current locale | ||||||
| @ -821,10 +821,10 @@ env PGOPTIONS='-c geqo=off' psql | |||||||
|         default is <literal>NOTICE</>. Valid values are <literal>DEBUG5</>, |         default is <literal>NOTICE</>. Valid values are <literal>DEBUG5</>, | ||||||
|         <literal>DEBUG4</>, <literal>DEBUG3</>, <literal>DEBUG2</>, |         <literal>DEBUG4</>, <literal>DEBUG3</>, <literal>DEBUG2</>, | ||||||
|         <literal>DEBUG1</>, <literal>INFO</>, <literal>NOTICE</>, |         <literal>DEBUG1</>, <literal>INFO</>, <literal>NOTICE</>, | ||||||
|         <literal>ERROR</>, <literal>LOG</>, <literal>FATAL</>, |         <literal>WARNING</>, <literal>ERROR</>, <literal>LOG</>,  | ||||||
|         <literal>PANIC</>. Later values send less detail to the logs. | 	<literal>FATAL</>, and <literal>PANIC</>. Later values send less  | ||||||
|         <literal>LOG</> has a different precedence here than in | 	detail to the logs. <literal>LOG</> has a different precedence  | ||||||
|         <literal>CLIENT_MIN_MESSAGES</>. | 	here than in <literal>CLIENT_MIN_MESSAGES</>. | ||||||
|        </para> |        </para> | ||||||
|       </listitem> |       </listitem> | ||||||
|      </varlistentry> |      </varlistentry> | ||||||
| @ -834,13 +834,13 @@ env PGOPTIONS='-c geqo=off' psql | |||||||
|       <listitem> |       <listitem> | ||||||
|        <para> |        <para> | ||||||
|         This controls how much detail is written to the client. The |         This controls how much detail is written to the client. The | ||||||
|         default is <literal>INFO</>. Valid values are |         default is <literal>NOTICE</>. Valid values are | ||||||
|         <literal>DEBUG5</>, <literal>DEBUG4</>, <literal>DEBUG3</>, |         <literal>DEBUG5</>, <literal>DEBUG4</>, <literal>DEBUG3</>, | ||||||
|         <literal>DEBUG2</>, <literal>DEBUG1</>, <literal>LOG</>, |         <literal>DEBUG2</>, <literal>DEBUG1</>, <literal>LOG</>, | ||||||
|         <literal>INFO</>, <literal>NOTICE</>, <literal>ERROR</>, |         <literal>NOTICE</>, <literal>WARNING</>, and <literal>ERROR</>.  | ||||||
|         <literal>FATAL</>, <literal>PANIC</>. Later values send less | 	Later values send less information to the user. <literal>LOG</>  | ||||||
|         information to the user. literal>LOG</> has a different | 	has a different precedence here than in  | ||||||
|         precedence here than in <literal>SERVER_MIN_MESSAGES</>. | 	<literal>SERVER_MIN_MESSAGES</>. | ||||||
|        </para> |        </para> | ||||||
|       </listitem> |       </listitem> | ||||||
|      </varlistentry> |      </varlistentry> | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <!-- | <!-- | ||||||
| $Header: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v 1.20 2001/11/21 06:09:45 thomas Exp $ | $Header: /cvsroot/pgsql/doc/src/sgml/spi.sgml,v 1.21 2002/03/06 06:44:33 momjian Exp $ | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
| <Chapter id="spi"> | <Chapter id="spi"> | ||||||
| @ -3801,7 +3801,7 @@ execq(text *sql, int cnt) | |||||||
|     proc = SPI_processed; |     proc = SPI_processed; | ||||||
|     /* |     /* | ||||||
|      * If this is SELECT and some tuple(s) fetched - |      * If this is SELECT and some tuple(s) fetched - | ||||||
|      * returns tuples to the caller via elog (NOTICE). |      * returns tuples to the caller via elog (INFO). | ||||||
|      */ |      */ | ||||||
|     if ( ret == SPI_OK_SELECT && SPI_processed > 0 ) |     if ( ret == SPI_OK_SELECT && SPI_processed > 0 ) | ||||||
|     { |     { | ||||||
| @ -3818,7 +3818,7 @@ execq(text *sql, int cnt) | |||||||
|                 sprintf(buf + strlen (buf), " %s%s", |                 sprintf(buf + strlen (buf), " %s%s", | ||||||
|                         SPI_getvalue(tuple, tupdesc, i), |                         SPI_getvalue(tuple, tupdesc, i), | ||||||
|                         (i == tupdesc->natts) ? " " : " |"); |                         (i == tupdesc->natts) ? " " : " |"); | ||||||
|             elog (NOTICE, "EXECQ: %s", buf); |             elog (INFO, "EXECQ: %s", buf); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -3850,9 +3850,9 @@ execq | |||||||
| vac=> INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)',0)); | vac=> INSERT INTO a VALUES (execq('INSERT INTO a VALUES (0)',0)); | ||||||
| INSERT 167631 1 | INSERT 167631 1 | ||||||
| vac=> SELECT execq('SELECT * FROM a',0); | vac=> SELECT execq('SELECT * FROM a',0); | ||||||
| NOTICE:EXECQ:  0 <<< inserted by execq | INFO:  EXECQ:  0 <<< inserted by execq | ||||||
| 
 | 
 | ||||||
| NOTICE:EXECQ:  1 <<< value returned by execq and inserted by upper INSERT | INFO:  EXECQ:  1 <<< value returned by execq and inserted by upper INSERT | ||||||
| 
 | 
 | ||||||
| execq | execq | ||||||
| ----- | ----- | ||||||
| @ -3866,11 +3866,11 @@ execq | |||||||
| (1 row) | (1 row) | ||||||
| 
 | 
 | ||||||
| vac=> SELECT execq('SELECT * FROM a', 10); | vac=> SELECT execq('SELECT * FROM a', 10); | ||||||
| NOTICE:EXECQ:  0  | INFO:  EXECQ:  0  | ||||||
| 
 | 
 | ||||||
| NOTICE:EXECQ:  1  | INFO:  EXECQ:  1  | ||||||
| 
 | 
 | ||||||
| NOTICE:EXECQ:  2 <<< 0 + 2, only one tuple inserted - as specified | INFO:  EXECQ:  2 <<< 0 + 2, only one tuple inserted - as specified | ||||||
| 
 | 
 | ||||||
| execq | execq | ||||||
| ----- | ----- | ||||||
| @ -3888,7 +3888,7 @@ x | |||||||
| (1 row) | (1 row) | ||||||
| 
 | 
 | ||||||
| vac=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1); | vac=> INSERT INTO a VALUES (execq('SELECT * FROM a', 0) + 1); | ||||||
| NOTICE:EXECQ:  0  | INFO:  EXECQ:  0  | ||||||
| INSERT 167713 1 | INSERT 167713 1 | ||||||
| vac=> SELECT * FROM a; | vac=> SELECT * FROM a; | ||||||
| x | x | ||||||
| @ -3900,11 +3900,11 @@ x | |||||||
| --   This demonstrates data changes visibility rule: | --   This demonstrates data changes visibility rule: | ||||||
| 
 | 
 | ||||||
| vac=> INSERT INTO a SELECT execq('SELECT * FROM a', 0) * x FROM a; | vac=> INSERT INTO a SELECT execq('SELECT * FROM a', 0) * x FROM a; | ||||||
| NOTICE:EXECQ:  1  | INFO:  EXECQ:  1  | ||||||
| NOTICE:EXECQ:  2  | INFO:  EXECQ:  2  | ||||||
| NOTICE:EXECQ:  1  | INFO:  EXECQ:  1  | ||||||
| NOTICE:EXECQ:  2  | INFO:  EXECQ:  2  | ||||||
| NOTICE:EXECQ:  2  | INFO:  EXECQ:  2  | ||||||
| INSERT 0 2 | INSERT 0 2 | ||||||
| vac=> SELECT * FROM a; | vac=> SELECT * FROM a; | ||||||
| x | x | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| <!-- | <!-- | ||||||
| $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.19 2001/12/04 02:07:11 tgl Exp $ | $Header: /cvsroot/pgsql/doc/src/sgml/trigger.sgml,v 1.20 2002/03/06 06:44:33 momjian Exp $ | ||||||
| --> | --> | ||||||
| 
 | 
 | ||||||
|  <chapter id="triggers"> |  <chapter id="triggers"> | ||||||
| @ -487,7 +487,7 @@ trigf(PG_FUNCTION_ARGS) | |||||||
| 	 | 	 | ||||||
| 	/* Connect to SPI manager */ | 	/* Connect to SPI manager */ | ||||||
| 	if ((ret = SPI_connect()) < 0) | 	if ((ret = SPI_connect()) < 0) | ||||||
| 		elog(NOTICE, "trigf (fired %s): SPI_connect returned %d", when, ret); | 		elog(INFO, "trigf (fired %s): SPI_connect returned %d", when, ret); | ||||||
| 	 | 	 | ||||||
| 	/* Get number of tuples in relation */ | 	/* Get number of tuples in relation */ | ||||||
| 	ret = SPI_exec("SELECT count(*) FROM ttest", 0); | 	ret = SPI_exec("SELECT count(*) FROM ttest", 0); | ||||||
| @ -535,7 +535,7 @@ vac=> CREATE TRIGGER tafter AFTER INSERT OR UPDATE OR DELETE ON ttest | |||||||
| FOR EACH ROW EXECUTE PROCEDURE trigf(); | FOR EACH ROW EXECUTE PROCEDURE trigf(); | ||||||
| CREATE | CREATE | ||||||
| vac=> INSERT INTO ttest VALUES (NULL); | vac=> INSERT INTO ttest VALUES (NULL); | ||||||
| NOTICE:trigf (fired before): there are 0 tuples in ttest | WARNING:  trigf (fired before): there are 0 tuples in ttest | ||||||
| INSERT 0 0 | INSERT 0 0 | ||||||
| 
 | 
 | ||||||
| -- Insertion skipped and AFTER trigger is not fired | -- Insertion skipped and AFTER trigger is not fired | ||||||
| @ -546,8 +546,8 @@ x | |||||||
| (0 rows) | (0 rows) | ||||||
| 
 | 
 | ||||||
| vac=> INSERT INTO ttest VALUES (1); | vac=> INSERT INTO ttest VALUES (1); | ||||||
| NOTICE:trigf (fired before): there are 0 tuples in ttest | INFO:  trigf (fired before): there are 0 tuples in ttest | ||||||
| NOTICE:trigf (fired after ): there are 1 tuples in ttest | INFO:  trigf (fired after ): there are 1 tuples in ttest | ||||||
|                                        ^^^^^^^^ |                                        ^^^^^^^^ | ||||||
|                              remember what we said about visibility. |                              remember what we said about visibility. | ||||||
| INSERT 167793 1 | INSERT 167793 1 | ||||||
| @ -558,8 +558,8 @@ x | |||||||
| (1 row) | (1 row) | ||||||
| 
 | 
 | ||||||
| vac=> INSERT INTO ttest SELECT x * 2 FROM ttest; | vac=> INSERT INTO ttest SELECT x * 2 FROM ttest; | ||||||
| NOTICE:trigf (fired before): there are 1 tuples in ttest | INFO:  trigf (fired before): there are 1 tuples in ttest | ||||||
| NOTICE:trigf (fired after ): there are 2 tuples in ttest | INFO:  trigf (fired after ): there are 2 tuples in ttest | ||||||
|                                        ^^^^^^^^ |                                        ^^^^^^^^ | ||||||
|                              remember what we said about visibility. |                              remember what we said about visibility. | ||||||
| INSERT 167794 1 | INSERT 167794 1 | ||||||
| @ -571,11 +571,11 @@ x | |||||||
| (2 rows) | (2 rows) | ||||||
| 
 | 
 | ||||||
| vac=> UPDATE ttest SET x = null WHERE x = 2; | vac=> UPDATE ttest SET x = null WHERE x = 2; | ||||||
| NOTICE:trigf (fired before): there are 2 tuples in ttest | INFO:  trigf (fired before): there are 2 tuples in ttest | ||||||
| UPDATE 0 | UPDATE 0 | ||||||
| vac=> UPDATE ttest SET x = 4 WHERE x = 2; | vac=> UPDATE ttest SET x = 4 WHERE x = 2; | ||||||
| NOTICE:trigf (fired before): there are 2 tuples in ttest | INFO:  trigf (fired before): there are 2 tuples in ttest | ||||||
| NOTICE:trigf (fired after ): there are 2 tuples in ttest | INFO:  trigf (fired after ): there are 2 tuples in ttest | ||||||
| UPDATE 1 | UPDATE 1 | ||||||
| vac=> SELECT * FROM ttest; | vac=> SELECT * FROM ttest; | ||||||
| x | x | ||||||
| @ -585,10 +585,10 @@ x | |||||||
| (2 rows) | (2 rows) | ||||||
| 
 | 
 | ||||||
| vac=> DELETE FROM ttest; | vac=> DELETE FROM ttest; | ||||||
| NOTICE:trigf (fired before): there are 2 tuples in ttest | INFO:  trigf (fired before): there are 2 tuples in ttest | ||||||
| NOTICE:trigf (fired after ): there are 1 tuples in ttest | INFO:  trigf (fired after ): there are 1 tuples in ttest | ||||||
| NOTICE:trigf (fired before): there are 1 tuples in ttest | INFO:  trigf (fired before): there are 1 tuples in ttest | ||||||
| NOTICE:trigf (fired after ): there are 0 tuples in ttest | INFO:  trigf (fired after ): there are 0 tuples in ttest | ||||||
|                                        ^^^^^^^^ |                                        ^^^^^^^^ | ||||||
|                              remember what we said about visibility. |                              remember what we said about visibility. | ||||||
| DELETE 2 | DELETE 2 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user