diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-03-06 06:10:59 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-03-06 06:10:59 +0000 |
commit | 92288a1cf9490be3835dc8524ee2ba407f1b885a (patch) | |
tree | c4fe79ee2cb5cb8fa3385580c6cf431a97c2fc48 /src/backend/access | |
parent | 22ebad9e39e268c9d4c6c2e422af727058830089 (diff) | |
download | postgresql-92288a1cf9490be3835dc8524ee2ba407f1b885a.tar.gz postgresql-92288a1cf9490be3835dc8524ee2ba407f1b885a.zip |
Change made to elog:
o Change all current CVS messages of NOTICE to WARNING. We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.
o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.
o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.
o Remove INFO from the client_min_messages options and add NOTICE.
Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.
Regression passed.
Diffstat (limited to 'src/backend/access')
-rw-r--r-- | src/backend/access/gist/gist.c | 6 | ||||
-rw-r--r-- | src/backend/access/nbtree/nbtinsert.c | 14 | ||||
-rw-r--r-- | src/backend/access/nbtree/nbtpage.c | 4 | ||||
-rw-r--r-- | src/backend/access/transam/xact.c | 26 | ||||
-rw-r--r-- | src/backend/access/transam/xlog.c | 12 |
5 files changed, 31 insertions, 31 deletions
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 586e5692f8b..34013f46889 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.90 2002/03/05 05:30:31 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.91 2002/03/06 06:09:15 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1926,7 +1926,7 @@ gist_dumptree(Relation r, int level, BlockNumber blk, OffsetNumber coff) maxoff = PageGetMaxOffsetNumber(page); - elog(NOTICE, "%sPage: %d %s blk: %d maxoff: %d free: %d", pred, + elog(DEBUG3, "%sPage: %d %s blk: %d maxoff: %d free: %d", pred, coff, (opaque->flags & F_LEAF) ? "LEAF" : "INTE", (int) blk, (int) maxoff, PageGetFreeSpace(page)); @@ -1936,7 +1936,7 @@ gist_dumptree(Relation r, int level, BlockNumber blk, OffsetNumber coff) which = (IndexTuple) PageGetItem(page, iid); cblk = ItemPointerGetBlockNumber(&(which->t_tid)); #ifdef PRINTTUPLE - elog(NOTICE, "%s Tuple. blk: %d size: %d", pred, (int) cblk, + elog(DEBUG3, "%s Tuple. blk: %d size: %d", pred, (int) cblk, IndexTupleSize(which)); #endif diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index d85fc2a966e..3a94297188c 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.89 2002/03/02 21:39:18 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.90 2002/03/06 06:09:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -520,7 +520,7 @@ _bt_insertonpg(Relation rel, elog(ERROR, "bt_insertonpg[%s]: no root page found", RelationGetRelationName(rel)); _bt_wrtbuf(rel, rbuf); _bt_wrtnorelbuf(rel, buf); - elog(NOTICE, "bt_insertonpg[%s]: root page unfound - fixing upper levels", RelationGetRelationName(rel)); + elog(WARNING, "bt_insertonpg[%s]: root page unfound - fixing upper levels", RelationGetRelationName(rel)); _bt_fixup(rel, buf); goto formres; } @@ -570,7 +570,7 @@ _bt_insertonpg(Relation rel, elog(ERROR, "_bt_getstackbuf: my bits moved right off the end of the world!" "\n\tRecreate index %s.", RelationGetRelationName(rel)); pfree(new_item); - elog(NOTICE, "bt_insertonpg[%s]: parent page unfound - fixing branch", RelationGetRelationName(rel)); + elog(WARNING, "bt_insertonpg[%s]: parent page unfound - fixing branch", RelationGetRelationName(rel)); _bt_fixbranch(rel, bknum, rbknum, stack); goto formres; } @@ -1574,7 +1574,7 @@ _bt_fixtree(Relation rel, BlockNumber blkno) /* Call _bt_fixroot() if there is no upper level */ if (BTreeInvalidParent(opaque)) { - elog(NOTICE, "bt_fixtree[%s]: fixing root page", RelationGetRelationName(rel)); + elog(WARNING, "bt_fixtree[%s]: fixing root page", RelationGetRelationName(rel)); buf = _bt_fixroot(rel, buf, true); _bt_relbuf(rel, buf); return; @@ -1925,7 +1925,7 @@ _bt_fixbranch(Relation rel, BlockNumber lblkno, break; } - elog(NOTICE, "bt_fixbranch[%s]: fixing upper levels", RelationGetRelationName(rel)); + elog(WARNING, "bt_fixbranch[%s]: fixing upper levels", RelationGetRelationName(rel)); _bt_fixup(rel, buf); return; @@ -1956,7 +1956,7 @@ _bt_fixup(Relation rel, Buffer buf) { blkno = opaque->btpo_parent; _bt_relbuf(rel, buf); - elog(NOTICE, "bt_fixup[%s]: checking/fixing upper levels", RelationGetRelationName(rel)); + elog(WARNING, "bt_fixup[%s]: checking/fixing upper levels", RelationGetRelationName(rel)); _bt_fixtree(rel, blkno); return; } @@ -1971,7 +1971,7 @@ _bt_fixup(Relation rel, Buffer buf) * Ok, we are on the leftmost page, it's write locked by us and its * btpo_parent points to meta page - time for _bt_fixroot(). */ - elog(NOTICE, "bt_fixup[%s]: fixing root page", RelationGetRelationName(rel)); + elog(WARNING, "bt_fixup[%s]: fixing root page", RelationGetRelationName(rel)); buf = _bt_fixroot(rel, buf, true); _bt_relbuf(rel, buf); } diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 17006ed06ce..7a30b8001fa 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.55 2002/01/15 22:14:17 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.56 2002/03/06 06:09:18 momjian Exp $ * * NOTES * Postgres btree pages look like ordinary relation pages. The opaque @@ -253,7 +253,7 @@ _bt_getroot(Relation rel, int access) /* handle concurrent fix of root page */ if (BTreeInvalidParent(rootopaque)) /* unupdated! */ { - elog(NOTICE, "bt_getroot[%s]: fixing root page", RelationGetRelationName(rel)); + elog(WARNING, "bt_getroot[%s]: fixing root page", RelationGetRelationName(rel)); newrootbuf = _bt_fixroot(rel, rootbuf, true); LockBuffer(newrootbuf, BUFFER_LOCK_UNLOCK); LockBuffer(newrootbuf, BT_READ); diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 995d821de93..f5e3ad8e199 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.116 2002/03/02 21:39:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.117 2002/03/06 06:09:21 momjian Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -920,7 +920,7 @@ CommitTransaction(void) * check the current transaction state */ if (s->state != TRANS_INPROGRESS) - elog(NOTICE, "CommitTransaction and not in in-progress state"); + elog(WARNING, "CommitTransaction and not in in-progress state"); /* * Tell the trigger manager that this transaction is about to be @@ -1044,7 +1044,7 @@ AbortTransaction(void) * check the current transaction state */ if (s->state != TRANS_INPROGRESS) - elog(NOTICE, "AbortTransaction and not in in-progress state"); + elog(WARNING, "AbortTransaction and not in in-progress state"); /* * set the current transaction state information appropriately during @@ -1163,7 +1163,7 @@ StartTransactionCommand(void) * warning and change to the in-progress state. */ case TBLOCK_BEGIN: - elog(NOTICE, "StartTransactionCommand: unexpected TBLOCK_BEGIN"); + elog(WARNING, "StartTransactionCommand: unexpected TBLOCK_BEGIN"); s->blockState = TBLOCK_INPROGRESS; break; @@ -1184,7 +1184,7 @@ StartTransactionCommand(void) * and change to the default state. */ case TBLOCK_END: - elog(NOTICE, "StartTransactionCommand: unexpected TBLOCK_END"); + elog(WARNING, "StartTransactionCommand: unexpected TBLOCK_END"); s->blockState = TBLOCK_DEFAULT; CommitTransaction(); StartTransaction(); @@ -1207,7 +1207,7 @@ StartTransactionCommand(void) * default. */ case TBLOCK_ENDABORT: - elog(NOTICE, "StartTransactionCommand: unexpected TBLOCK_ENDABORT"); + elog(WARNING, "StartTransactionCommand: unexpected TBLOCK_ENDABORT"); break; } @@ -1387,7 +1387,7 @@ BeginTransactionBlock(void) * check the current transaction state */ if (s->blockState != TBLOCK_DEFAULT) - elog(NOTICE, "BEGIN: already a transaction in progress"); + elog(WARNING, "BEGIN: already a transaction in progress"); /* * set the current transaction block state information appropriately @@ -1444,11 +1444,11 @@ EndTransactionBlock(void) /* * here, the user issued COMMIT when not inside a transaction. Issue a - * notice and go to abort state. The upcoming call to + * WARNING and go to abort state. The upcoming call to * CommitTransactionCommand() will then put us back into the default * state. */ - elog(NOTICE, "COMMIT: no transaction in progress"); + elog(WARNING, "COMMIT: no transaction in progress"); AbortTransaction(); s->blockState = TBLOCK_ENDABORT; } @@ -1481,11 +1481,11 @@ AbortTransactionBlock(void) /* * here, the user issued ABORT when not inside a transaction. Issue a - * notice and go to abort state. The upcoming call to + * WARNING and go to abort state. The upcoming call to * CommitTransactionCommand() will then put us back into the default * state. */ - elog(NOTICE, "ROLLBACK: no transaction in progress"); + elog(WARNING, "ROLLBACK: no transaction in progress"); AbortTransaction(); s->blockState = TBLOCK_ENDABORT; } @@ -1528,11 +1528,11 @@ UserAbortTransactionBlock(void) /* * here, the user issued ABORT when not inside a transaction. Issue a - * notice and go to abort state. The upcoming call to + * WARNING and go to abort state. The upcoming call to * CommitTransactionCommand() will then put us back into the default * state. */ - elog(NOTICE, "ROLLBACK: no transaction in progress"); + elog(WARNING, "ROLLBACK: no transaction in progress"); AbortTransaction(); s->blockState = TBLOCK_ENDABORT; } diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 572f892bd3d..add269577b6 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.88 2002/03/02 21:39:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.89 2002/03/06 06:09:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1284,7 +1284,7 @@ XLogFlush(XLogRecPtr record) * CreateCheckpoint will try to flush it at the end of recovery.) * * The current approach is to ERROR under normal conditions, but only - * NOTICE during recovery, so that the system can be brought up even if + * WARNING during recovery, so that the system can be brought up even if * there's a corrupt LSN. Note that for calls from xact.c, the ERROR * will be promoted to PANIC since xact.c calls this routine inside a * critical section. However, calls from bufmgr.c are not within @@ -1292,7 +1292,7 @@ XLogFlush(XLogRecPtr record) * on a data page. */ if (XLByteLT(LogwrtResult.Flush, record)) - elog(InRecovery ? NOTICE : ERROR, + elog(InRecovery ? WARNING : ERROR, "XLogFlush: request %X/%X is not satisfied --- flushed only to %X/%X", record.xlogid, record.xrecoff, LogwrtResult.Flush.xlogid, LogwrtResult.Flush.xrecoff); @@ -1609,7 +1609,7 @@ MoveOfflineLogs(uint32 log, uint32 seg, XLogRecPtr endptr) { elog(LOG, "archiving transaction log file %s", xlde->d_name); - elog(NOTICE, "archiving log files is not implemented!"); + elog(WARNING, "archiving log files is not implemented!"); } else { @@ -2091,12 +2091,12 @@ WriteControlFile(void) StrNCpy(ControlFile->lc_ctype, localeptr, LOCALE_NAME_BUFLEN); /* - * Issue warning notice if initdb'ing in a locale that will not permit + * Issue warning WARNING if initdb'ing in a locale that will not permit * LIKE index optimization. This is not a clean place to do it, but I * don't see a better place either... */ if (!locale_is_like_safe()) - elog(NOTICE, "Initializing database with %s collation order." + elog(WARNING, "Initializing database with %s collation order." "\n\tThis locale setting will prevent use of index optimization for" "\n\tLIKE and regexp searches. If you are concerned about speed of" "\n\tsuch queries, you may wish to set LC_COLLATE to \"C\" and" |