diff options
| author | Bruce Momjian <bruce@momjian.us> | 2003-05-27 17:49:47 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2003-05-27 17:49:47 +0000 |
| commit | 98b6f37e47a9eb3540493caabf57d0f952ebdc6d (patch) | |
| tree | 656cf699ff40581f8f465e820aa62cb4a55547a0 /src/backend/utils | |
| parent | 24daeb8e73f924df26a38185296d5a6a6c49acb1 (diff) | |
| download | postgresql-98b6f37e47a9eb3540493caabf57d0f952ebdc6d.tar.gz | |
Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/adt/varbit.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/cache/catcache.c | 66 | ||||
| -rw-r--r-- | src/backend/utils/fmgr/dfmgr.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/init/findbe.c | 18 | ||||
| -rw-r--r-- | src/backend/utils/misc/guc-file.l | 4 | ||||
| -rw-r--r-- | src/backend/utils/misc/guc.c | 10 |
6 files changed, 53 insertions, 53 deletions
diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index e494c03369..3624bdc03e 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.30 2003/05/12 23:08:50 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.31 2003/05/27 17:49:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1321,7 +1321,7 @@ bitposition(PG_FUNCTION_ARGS) mask2 = end_mask << (BITS_PER_BYTE - is); is_match = mask2 == 0; #if 0 - elog(DEBUG3, "S. %d %d em=%2x sm=%2x r=%d", + elog(DEBUG4, "S. %d %d em=%2x sm=%2x r=%d", i, is, end_mask, mask2, is_match); #endif break; diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index 77ddf4a50e..65d716f6ba 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.102 2002/11/13 00:39:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.103 2003/05/27 17:49:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -164,7 +164,7 @@ CatalogCacheComputeHashValue(CatCache *cache, int nkeys, ScanKey cur_skey) { uint32 hashValue = 0; - CACHE4_elog(DEBUG1, "CatalogCacheComputeHashValue %s %d %p", + CACHE4_elog(DEBUG2, "CatalogCacheComputeHashValue %s %d %p", cache->cc_relname, nkeys, cache); @@ -281,14 +281,14 @@ CatCachePrintStats(void) long cc_lsearches = 0; long cc_lhits = 0; - elog(DEBUG1, "Catcache stats dump: %d/%d tuples in catcaches", + elog(DEBUG2, "Catcache stats dump: %d/%d tuples in catcaches", CacheHdr->ch_ntup, CacheHdr->ch_maxtup); for (cache = CacheHdr->ch_caches; cache; cache = cache->cc_next) { if (cache->cc_ntup == 0 && cache->cc_searches == 0) continue; /* don't print unused caches */ - elog(DEBUG1, "Catcache %s/%s: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits", + elog(DEBUG2, "Catcache %s/%s: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits", cache->cc_relname, cache->cc_indname, cache->cc_ntup, @@ -312,7 +312,7 @@ CatCachePrintStats(void) cc_lsearches += cache->cc_lsearches; cc_lhits += cache->cc_lhits; } - elog(DEBUG1, "Catcache totals: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits", + elog(DEBUG2, "Catcache totals: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits", CacheHdr->ch_ntup, cc_searches, cc_hits, @@ -419,7 +419,7 @@ CatalogCacheIdInvalidate(int cacheId, * sanity checks */ Assert(ItemPointerIsValid(pointer)); - CACHE1_elog(DEBUG1, "CatalogCacheIdInvalidate: called"); + CACHE1_elog(DEBUG2, "CatalogCacheIdInvalidate: called"); /* * inspect caches to find the proper cache @@ -476,7 +476,7 @@ CatalogCacheIdInvalidate(int cacheId, ct->dead = true; else CatCacheRemoveCTup(ccp, ct); - CACHE1_elog(DEBUG1, "CatalogCacheIdInvalidate: invalidated"); + CACHE1_elog(DEBUG2, "CatalogCacheIdInvalidate: invalidated"); #ifdef CATCACHE_STATS ccp->cc_invals++; #endif @@ -641,12 +641,12 @@ ResetCatalogCaches(void) { CatCache *cache; - CACHE1_elog(DEBUG1, "ResetCatalogCaches called"); + CACHE1_elog(DEBUG2, "ResetCatalogCaches called"); for (cache = CacheHdr->ch_caches; cache; cache = cache->cc_next) ResetCatalogCache(cache); - CACHE1_elog(DEBUG1, "end of ResetCatalogCaches call"); + CACHE1_elog(DEBUG2, "end of ResetCatalogCaches call"); } /* @@ -674,7 +674,7 @@ CatalogCacheFlushRelation(Oid relId) { CatCache *cache; - CACHE2_elog(DEBUG1, "CatalogCacheFlushRelation called for %u", relId); + CACHE2_elog(DEBUG2, "CatalogCacheFlushRelation called for %u", relId); for (cache = CacheHdr->ch_caches; cache; cache = cache->cc_next) { @@ -744,7 +744,7 @@ CatalogCacheFlushRelation(Oid relId) } } - CACHE1_elog(DEBUG1, "end of CatalogCacheFlushRelation call"); + CACHE1_elog(DEBUG2, "end of CatalogCacheFlushRelation call"); } /* @@ -756,14 +756,14 @@ CatalogCacheFlushRelation(Oid relId) * structure initialized on the first access. */ #ifdef CACHEDEBUG -#define InitCatCache_DEBUG1 \ +#define InitCatCache_DEBUG2 \ do { \ - elog(DEBUG1, "InitCatCache: rel=%s id=%d nkeys=%d size=%d\n", \ + elog(DEBUG2, "InitCatCache: rel=%s id=%d nkeys=%d size=%d\n", \ cp->cc_relname, cp->id, cp->cc_nkeys, cp->cc_nbuckets); \ } while(0) #else -#define InitCatCache_DEBUG1 +#define InitCatCache_DEBUG2 #endif CatCache * @@ -832,7 +832,7 @@ InitCatCache(int id, * new cache is initialized as far as we can go for now. print some * debugging information, if appropriate. */ - InitCatCache_DEBUG1; + InitCatCache_DEBUG2; /* * add completed cache to top of group header's list @@ -856,24 +856,24 @@ InitCatCache(int id, * that the relcache entry can be opened at this point! */ #ifdef CACHEDEBUG -#define CatalogCacheInitializeCache_DEBUG1 \ - elog(DEBUG1, "CatalogCacheInitializeCache: cache @%p %s", cache, \ +#define CatalogCacheInitializeCache_DEBUG2 \ + elog(DEBUG2, "CatalogCacheInitializeCache: cache @%p %s", cache, \ cache->cc_relname) #define CatalogCacheInitializeCache_DEBUG2 \ do { \ if (cache->cc_key[i] > 0) { \ - elog(DEBUG1, "CatalogCacheInitializeCache: load %d/%d w/%d, %u", \ + elog(DEBUG2, "CatalogCacheInitializeCache: load %d/%d w/%d, %u", \ i+1, cache->cc_nkeys, cache->cc_key[i], \ tupdesc->attrs[cache->cc_key[i] - 1]->atttypid); \ } else { \ - elog(DEBUG1, "CatalogCacheInitializeCache: load %d/%d w/%d", \ + elog(DEBUG2, "CatalogCacheInitializeCache: load %d/%d w/%d", \ i+1, cache->cc_nkeys, cache->cc_key[i]); \ } \ } while(0) #else -#define CatalogCacheInitializeCache_DEBUG1 +#define CatalogCacheInitializeCache_DEBUG2 #define CatalogCacheInitializeCache_DEBUG2 #endif @@ -885,7 +885,7 @@ CatalogCacheInitializeCache(CatCache *cache) TupleDesc tupdesc; int i; - CatalogCacheInitializeCache_DEBUG1; + CatalogCacheInitializeCache_DEBUG2; /* * Open the relation without locking --- we only need the tupdesc, @@ -920,7 +920,7 @@ CatalogCacheInitializeCache(CatCache *cache) heap_close(relation, NoLock); - CACHE3_elog(DEBUG1, "CatalogCacheInitializeCache: %s, %d keys", + CACHE3_elog(DEBUG2, "CatalogCacheInitializeCache: %s, %d keys", cache->cc_relname, cache->cc_nkeys); /* @@ -958,7 +958,7 @@ CatalogCacheInitializeCache(CatCache *cache) /* Initialize sk_attno suitably for HeapKeyTest() and heap scans */ cache->cc_skey[i].sk_attno = cache->cc_key[i]; - CACHE4_elog(DEBUG1, "CatalogCacheInit %s %d %p", + CACHE4_elog(DEBUG2, "CatalogCacheInit %s %d %p", cache->cc_relname, i, cache); @@ -1150,7 +1150,7 @@ SearchCatCache(CatCache *cache, { ct->refcount++; - CACHE3_elog(DEBUG1, "SearchCatCache(%s): found in bucket %d", + CACHE3_elog(DEBUG2, "SearchCatCache(%s): found in bucket %d", cache->cc_relname, hashIndex); #ifdef CATCACHE_STATS @@ -1161,7 +1161,7 @@ SearchCatCache(CatCache *cache, } else { - CACHE3_elog(DEBUG1, "SearchCatCache(%s): found neg entry in bucket %d", + CACHE3_elog(DEBUG2, "SearchCatCache(%s): found neg entry in bucket %d", cache->cc_relname, hashIndex); #ifdef CATCACHE_STATS @@ -1223,9 +1223,9 @@ SearchCatCache(CatCache *cache, true); heap_freetuple(ntp); - CACHE4_elog(DEBUG1, "SearchCatCache(%s): Contains %d/%d tuples", + CACHE4_elog(DEBUG2, "SearchCatCache(%s): Contains %d/%d tuples", cache->cc_relname, cache->cc_ntup, CacheHdr->ch_ntup); - CACHE3_elog(DEBUG1, "SearchCatCache(%s): put neg entry in bucket %d", + CACHE3_elog(DEBUG2, "SearchCatCache(%s): put neg entry in bucket %d", cache->cc_relname, hashIndex); /* @@ -1237,9 +1237,9 @@ SearchCatCache(CatCache *cache, return NULL; } - CACHE4_elog(DEBUG1, "SearchCatCache(%s): Contains %d/%d tuples", + CACHE4_elog(DEBUG2, "SearchCatCache(%s): Contains %d/%d tuples", cache->cc_relname, cache->cc_ntup, CacheHdr->ch_ntup); - CACHE3_elog(DEBUG1, "SearchCatCache(%s): put in bucket %d", + CACHE3_elog(DEBUG2, "SearchCatCache(%s): put in bucket %d", cache->cc_relname, hashIndex); #ifdef CATCACHE_STATS @@ -1388,7 +1388,7 @@ SearchCatCacheList(CatCache *cache, /* Bump the list's refcount and return it */ cl->refcount++; - CACHE2_elog(DEBUG1, "SearchCatCacheList(%s): found list", + CACHE2_elog(DEBUG2, "SearchCatCacheList(%s): found list", cache->cc_relname); #ifdef CATCACHE_STATS @@ -1510,7 +1510,7 @@ SearchCatCacheList(CatCache *cache, DLAddHead(&cache->cc_lists, &cl->cache_elem); - CACHE3_elog(DEBUG1, "SearchCatCacheList(%s): made list of %d members", + CACHE3_elog(DEBUG2, "SearchCatCacheList(%s): made list of %d members", cache->cc_relname, nmembers); return cl; @@ -1613,7 +1613,7 @@ CatalogCacheCreateEntry(CatCache *cache, HeapTuple ntp, if (oldct->refcount == 0) { - CACHE2_elog(DEBUG1, "CatCacheCreateEntry(%s): Overflow, LRU removal", + CACHE2_elog(DEBUG2, "CatCacheCreateEntry(%s): Overflow, LRU removal", cache->cc_relname); #ifdef CATCACHE_STATS oldct->my_cache->cc_discards++; @@ -1731,7 +1731,7 @@ PrepareToInvalidateCacheTuple(Relation relation, CatCache *ccp; Oid reloid; - CACHE1_elog(DEBUG1, "PrepareToInvalidateCacheTuple: called"); + CACHE1_elog(DEBUG2, "PrepareToInvalidateCacheTuple: called"); /* * sanity checks diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index 7b9d9c25a4..671962d0f5 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.59 2003/04/05 19:54:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.60 2003/05/27 17:49:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -402,7 +402,7 @@ find_in_dynamic_libpath(const char *basename) sprintf(full, "%s/%s", mangled, basename); pfree(mangled); - elog(DEBUG2, "find_in_dynamic_libpath: trying %s", full); + elog(DEBUG3, "find_in_dynamic_libpath: trying %s", full); if (file_exists(full)) return full; diff --git a/src/backend/utils/init/findbe.c b/src/backend/utils/init/findbe.c index b0bb792379..fabdd71911 100644 --- a/src/backend/utils/init/findbe.c +++ b/src/backend/utils/init/findbe.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.33 2003/05/15 16:35:29 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.34 2003/05/27 17:49:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -62,13 +62,13 @@ ValidateBinary(char *path) */ if (stat(path, &buf) < 0) { - elog(DEBUG2, "ValidateBinary: can't stat \"%s\"", path); + elog(DEBUG3, "ValidateBinary: can't stat \"%s\"", path); return -1; } if ((buf.st_mode & S_IFMT) != S_IFREG) { - elog(DEBUG2, "ValidateBinary: \"%s\" is not a regular file", path); + elog(DEBUG3, "ValidateBinary: \"%s\" is not a regular file", path); return -1; } @@ -95,7 +95,7 @@ ValidateBinary(char *path) is_r = buf.st_mode & S_IRUSR; is_x = buf.st_mode & S_IXUSR; if (!(is_r && is_x)) - elog(DEBUG2, "ValidateBinary: \"%s\" is not user read/execute", path); + elog(DEBUG3, "ValidateBinary: \"%s\" is not user read/execute", path); return is_x ? (is_r ? 0 : -2) : -1; } pwp = getpwuid(euid); @@ -121,7 +121,7 @@ ValidateBinary(char *path) is_r = buf.st_mode & S_IRGRP; is_x = buf.st_mode & S_IXGRP; if (!(is_r && is_x)) - elog(DEBUG2, "ValidateBinary: \"%s\" is not group read/execute", + elog(DEBUG3, "ValidateBinary: \"%s\" is not group read/execute", path); return is_x ? (is_r ? 0 : -2) : -1; } @@ -129,7 +129,7 @@ ValidateBinary(char *path) is_r = buf.st_mode & S_IROTH; is_x = buf.st_mode & S_IXOTH; if (!(is_r && is_x)) - elog(DEBUG2, "ValidateBinary: \"%s\" is not other read/execute", + elog(DEBUG3, "ValidateBinary: \"%s\" is not other read/execute", path); return is_x ? (is_r ? 0 : -2) : -1; #endif @@ -179,7 +179,7 @@ FindExec(char *full_path, const char *argv0, const char *binary_name) if (ValidateBinary(buf) == 0) { strncpy(full_path, buf, MAXPGPATH); - elog(DEBUG1, "FindExec: found \"%s\" using argv[0]", full_path); + elog(DEBUG2, "FindExec: found \"%s\" using argv[0]", full_path); return 0; } elog(LOG, "FindExec: invalid binary \"%s\"", buf); @@ -192,7 +192,7 @@ FindExec(char *full_path, const char *argv0, const char *binary_name) */ if ((p = getenv("PATH")) && *p) { - elog(DEBUG1, "FindExec: searching PATH ..."); + elog(DEBUG2, "FindExec: searching PATH ..."); path = strdup(p); /* make a modifiable copy */ for (startp = path, endp = strchr(path, ':'); startp && *startp; @@ -213,7 +213,7 @@ FindExec(char *full_path, const char *argv0, const char *binary_name) { case 0: /* found ok */ strncpy(full_path, buf, MAXPGPATH); - elog(DEBUG1, "FindExec: found \"%s\" using PATH", + elog(DEBUG2, "FindExec: found \"%s\" using PATH", full_path); free(path); return 0; diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l index 6245fde2d3..3c4601c0fc 100644 --- a/src/backend/utils/misc/guc-file.l +++ b/src/backend/utils/misc/guc-file.l @@ -4,7 +4,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.14 2002/11/08 20:23:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.15 2003/05/27 17:49:46 momjian Exp $ */ %{ @@ -136,7 +136,7 @@ ProcessConfigFile(GucContext context) Assert(context == PGC_POSTMASTER || context == PGC_BACKEND || context == PGC_SIGHUP); Assert(DataDir); - elevel = (context == PGC_SIGHUP) ? DEBUG3 : ERROR; + elevel = (context == PGC_SIGHUP) ? DEBUG4 : ERROR; /* * Open file diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 7383cd48df..1421d5411b 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut <peter_e@gmx.net>. * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.124 2003/05/14 03:26:02 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.125 2003/05/27 17:49:46 momjian Exp $ * *-------------------------------------------------------------------- */ @@ -1721,7 +1721,7 @@ set_config_option(const char *name, const char *value, bool makeDefault; if (context == PGC_SIGHUP || source == PGC_S_DEFAULT) - elevel = DEBUG1; + elevel = DEBUG2; else if (source == PGC_S_DATABASE || source == PGC_S_USER) elevel = INFO; else @@ -1830,7 +1830,7 @@ set_config_option(const char *name, const char *value, { if (DoIt && !makeDefault) { - elog(DEBUG2, "%s: setting ignored because previous source is higher priority", + elog(DEBUG3, "%s: setting ignored because previous source is higher priority", name); return true; } @@ -2855,7 +2855,7 @@ write_nondefault_variables(GucContext context) Assert(context == PGC_POSTMASTER || context == PGC_SIGHUP); Assert(DataDir); - elevel = (context == PGC_SIGHUP) ? DEBUG3 : ERROR; + elevel = (context == PGC_SIGHUP) ? DEBUG4 : ERROR; /* * Open file @@ -3366,7 +3366,7 @@ assign_msglvl(int *var, const char *newval, bool doit, bool interactive) if (strcasecmp(newval, "debug") == 0) { if (doit) - (*var) = DEBUG1; + (*var) = DEBUG2; } else if (strcasecmp(newval, "debug5") == 0) { |
