Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98b6f37

Browse files
committed
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.
1 parent24daeb8 commit98b6f37

File tree

43 files changed

+244
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+244
-238
lines changed

‎contrib/intarray/_int.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ printarr(ArrayType *a, int num)
110110
initStringInfo(&bbb);
111111
for (l=0;l<min(num,ARRNELEMS(a));l++)
112112
appendStringInfo(&bbb,"%d ",d[l]);
113-
elog(DEBUG3,"\t\t%s",bbb.data);
113+
elog(DEBUG4,"\t\t%s",bbb.data);
114114
pfree(bbb.data);
115115
}
116116
staticvoid
@@ -122,7 +122,7 @@ printbitvec(BITVEC bv)
122122
str[SIGLENBIT]='\0';
123123
LOOPBIT(str[i]= (GETBIT(bv,i)) ?'1' :'0');
124124

125-
elog(DEBUG3,"BV: %s",str);
125+
elog(DEBUG4,"BV: %s",str);
126126
}
127127
#endif
128128

@@ -589,7 +589,7 @@ inner_int_contains(ArrayType *a, ArrayType *b)
589589
db=ARRPTR(b);
590590

591591
#ifdefGIST_DEBUG
592-
elog(DEBUG3,"contains %d %d",na,nb);
592+
elog(DEBUG4,"contains %d %d",na,nb);
593593
#endif
594594

595595
i=j=n=0;
@@ -709,7 +709,7 @@ inner_int_overlap(ArrayType *a, ArrayType *b)
709709
db=ARRPTR(b);
710710

711711
#ifdefGIST_DEBUG
712-
elog(DEBUG3,"g_int_overlap");
712+
elog(DEBUG4,"g_int_overlap");
713713
#endif
714714

715715
i=j=0;
@@ -1334,7 +1334,7 @@ _int_common_union(bytea *entryvec, int *sizep, formarray unionf)
13341334
ArrayType*tmp;
13351335

13361336
#ifdefGIST_DEBUG
1337-
elog(DEBUG3,"_int_common_union in");
1337+
elog(DEBUG4,"_int_common_union in");
13381338
#endif
13391339

13401340
numranges= (VARSIZE(entryvec)-VARHDRSZ) /sizeof(GISTENTRY);
@@ -1355,12 +1355,12 @@ _int_common_union(bytea *entryvec, int *sizep, formarray unionf)
13551355
{
13561356
pfree(out);
13571357
#ifdefGIST_DEBUG
1358-
elog(DEBUG3,"_int_common_union out1");
1358+
elog(DEBUG4,"_int_common_union out1");
13591359
#endif
13601360
returnNULL;
13611361
}
13621362
#ifdefGIST_DEBUG
1363-
elog(DEBUG3,"_int_common_union out");
1363+
elog(DEBUG4,"_int_common_union out");
13641364
#endif
13651365
return (out);
13661366

@@ -1380,7 +1380,7 @@ _int_common_penalty(GISTENTRY *origentry, GISTENTRY *newentry, float *result,
13801380
tmp2;
13811381

13821382
#ifdefGIST_DEBUG
1383-
elog(DEBUG3,"penalty");
1383+
elog(DEBUG4,"penalty");
13841384
#endif
13851385
ud= (*unionf) ((ArrayType*)DatumGetPointer(origentry->key),
13861386
(ArrayType*)DatumGetPointer(newentry->key));
@@ -1390,7 +1390,7 @@ _int_common_penalty(GISTENTRY *origentry, GISTENTRY *newentry, float *result,
13901390
pfree(ud);
13911391

13921392
#ifdefGIST_DEBUG
1393-
elog(DEBUG3,"--penalty\t%g",*result);
1393+
elog(DEBUG4,"--penalty\t%g",*result);
13941394
#endif
13951395

13961396
return (result);
@@ -1451,7 +1451,7 @@ _int_common_picksplit(bytea *entryvec,
14511451
SPLITCOST*costvector;
14521452

14531453
#ifdefGIST_DEBUG
1454-
elog(DEBUG3,"--------picksplit %d", (VARSIZE(entryvec)-VARHDRSZ) /sizeof(GISTENTRY));
1454+
elog(DEBUG4,"--------picksplit %d", (VARSIZE(entryvec)-VARHDRSZ) /sizeof(GISTENTRY));
14551455
#endif
14561456

14571457
maxoff= ((VARSIZE(entryvec)-VARHDRSZ) /sizeof(GISTENTRY))-2;
@@ -1609,7 +1609,7 @@ _int_common_picksplit(bytea *entryvec,
16091609
v->spl_rdatum=PointerGetDatum(datum_r);
16101610

16111611
#ifdefGIST_DEBUG
1612-
elog(DEBUG3,"--------ENDpicksplit %d %d",v->spl_nleft,v->spl_nright);
1612+
elog(DEBUG4,"--------ENDpicksplit %d %d",v->spl_nleft,v->spl_nright);
16131613
#endif
16141614
returnv;
16151615
}
@@ -1962,7 +1962,7 @@ static void
19621962
findoprnd(ITEM*ptr,int4*pos)
19631963
{
19641964
#ifdefBS_DEBUG
1965-
elog(DEBUG3, (ptr[*pos].type==OPR) ?
1965+
elog(DEBUG4, (ptr[*pos].type==OPR) ?
19661966
"%d %c" :"%d %d ",*pos,ptr[*pos].val);
19671967
#endif
19681968
if (ptr[*pos].type==VAL)
@@ -2045,7 +2045,7 @@ bqarr_in(PG_FUNCTION_ARGS)
20452045
else
20462046
appendStringInfo(&pbuf,"%d ",ptr[i].val);
20472047
}
2048-
elog(DEBUG3,"POR: %s",pbuf.data);
2048+
elog(DEBUG4,"POR: %s",pbuf.data);
20492049
pfree(pbuf.data);
20502050
#endif
20512051

‎contrib/rserv/rserv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ _rserv_log_()
132132
GetCurrentTransactionId(),deleted,rel->rd_id,okey);
133133

134134
if (debug)
135-
elog(DEBUG3,"sql: %s",sql);
135+
elog(DEBUG4,"sql: %s",sql);
136136

137137
ret=SPI_exec(sql,0);
138138

@@ -153,7 +153,7 @@ _rserv_log_()
153153
deleted,okey);
154154

155155
if (debug)
156-
elog(DEBUG3,"sql: %s",sql);
156+
elog(DEBUG4,"sql: %s",sql);
157157

158158
ret=SPI_exec(sql,0);
159159

@@ -177,7 +177,7 @@ _rserv_log_()
177177
rel->rd_id,GetCurrentTransactionId(),okey);
178178

179179
if (debug)
180-
elog(DEBUG3,"sql: %s",sql);
180+
elog(DEBUG4,"sql: %s",sql);
181181

182182
ret=SPI_exec(sql,0);
183183

‎contrib/spi/refint.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ check_primary_key(PG_FUNCTION_ARGS)
5959
inti;
6060

6161
#ifdefDEBUG_QUERY
62-
elog(DEBUG3,"Check_primary_key Enter Function");
62+
elog(DEBUG4,"Check_primary_key Enter Function");
6363
#endif
6464

6565
/*
@@ -249,7 +249,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
249249
r;
250250

251251
#ifdefDEBUG_QUERY
252-
elog(DEBUG3,"Check_foreign_key Enter Function");
252+
elog(DEBUG4,"Check_foreign_key Enter Function");
253253
#endif
254254

255255
/*
@@ -453,7 +453,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
453453
strcmp(type,"date")&&strcmp(type,"timestamp"))==0)
454454
is_char_type=1;
455455
#ifdefDEBUG_QUERY
456-
elog(DEBUG3,"Check_foreign_key Debug value %s type %s %d",
456+
elog(DEBUG4,"Check_foreign_key Debug value %s type %s %d",
457457
nv,type,is_char_type);
458458
#endif
459459

@@ -521,7 +521,7 @@ check_foreign_key(PG_FUNCTION_ARGS)
521521
}
522522
plan->nplans=nrefs;
523523
#ifdefDEBUG_QUERY
524-
elog(DEBUG3,"Check_foreign_key Debug Query is : %s ",sql);
524+
elog(DEBUG4,"Check_foreign_key Debug Query is : %s ",sql);
525525
#endif
526526
}
527527

‎contrib/tsearch/query.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ static void
449449
findoprnd(ITEM*ptr,int4*pos)
450450
{
451451
#ifdefBS_DEBUG
452-
elog(DEBUG3, (ptr[*pos].type==OPR) ?
452+
elog(DEBUG4, (ptr[*pos].type==OPR) ?
453453
"%d %c" :"%d %d ",*pos,ptr[*pos].val);
454454
#endif
455455
if (ptr[*pos].type==VAL||ptr[*pos].type==VALTRUE)
@@ -557,7 +557,7 @@ queryin(char *buf, void (*pushval) (QPRS_STATE *, int, char *, int))
557557
sprintf(cur,"%d(%s) ",ptr[i].val,GETOPERAND(query)+ptr[i].distance);
558558
cur=strchr(cur,'\0');
559559
}
560-
elog(DEBUG3,"POR: %s",pbuf);
560+
elog(DEBUG4,"POR: %s",pbuf);
561561
#endif
562562

563563
returnquery;
@@ -610,7 +610,7 @@ mqtxt_in(PG_FUNCTION_ARGS)
610610
sprintf(cur,"%d(%s) ",ptr[i].val,GETOPERAND(query)+ptr[i].distance);
611611
cur=strchr(cur,'\0');
612612
}
613-
elog(DEBUG3,"POR: %s",pbuf);
613+
elog(DEBUG4,"POR: %s",pbuf);
614614
#endif
615615
pfree(res);
616616
PG_RETURN_POINTER(query);

‎doc/src/sgml/runtime.sgml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.181 2003/05/23 16:34:36 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.182 2003/05/27 17:49:45 momjian Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -993,10 +993,13 @@ SET ENABLE_SEQSCAN TO OFF;
993993
<listitem>
994994
<para>
995995
These options enable various debugging output to be sent to the
996-
server log. For each executed query, they print the resultingparse
997-
tree, the query rewriter output, or the execution plan.
996+
client orserver log. For each executed query, they print the resulting
997+
parsetree, the query rewriter output, or the execution plan.
998998
<option>DEBUG_PRETTY_PRINT</option> indents these displays to
999999
produce a more readable but much longer output format.
1000+
<option>CLIENT_MIN_MESSAGES</option> or <option>LOG_MIN_MESSAGES</option>
1001+
must be <literal>DEBUG1</literal> or lower to send output to the client
1002+
or server logs.
10001003
</para>
10011004
</listitem>
10021005
</varlistentry>
@@ -1266,6 +1269,9 @@ SET ENABLE_SEQSCAN TO OFF;
12661269
Generates a great amount of debugging output for the
12671270
<command>LISTEN</command> and <command>NOTIFY</command>
12681271
commands.
1272+
<option>CLIENT_MIN_MESSAGES</option> or <option>LOG_MIN_MESSAGES</option>
1273+
must be <literal>DEBUG1</literal> or lower to send output to the client
1274+
or server logs.
12691275
</para>
12701276
</listitem>
12711277
</varlistentry>

‎src/backend/access/gist/gist.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.102 2003/03/10 22:28:18 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.103 2003/05/27 17:49:45 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1925,7 +1925,7 @@ gist_dumptree(Relation r, int level, BlockNumber blk, OffsetNumber coff)
19251925

19261926
maxoff=PageGetMaxOffsetNumber(page);
19271927

1928-
elog(DEBUG3,"%sPage: %d %s blk: %d maxoff: %d free: %d",pred,
1928+
elog(DEBUG4,"%sPage: %d %s blk: %d maxoff: %d free: %d",pred,
19291929
coff, (opaque->flags&F_LEAF) ?"LEAF" :"INTE", (int)blk,
19301930
(int)maxoff,PageGetFreeSpace(page));
19311931

@@ -1935,7 +1935,7 @@ gist_dumptree(Relation r, int level, BlockNumber blk, OffsetNumber coff)
19351935
which= (IndexTuple)PageGetItem(page,iid);
19361936
cblk=ItemPointerGetBlockNumber(&(which->t_tid));
19371937
#ifdefPRINTTUPLE
1938-
elog(DEBUG3,"%s Tuple. blk: %d size: %d",pred, (int)cblk,
1938+
elog(DEBUG4,"%s Tuple. blk: %d size: %d",pred, (int)cblk,
19391939
IndexTupleSize(which));
19401940
#endif
19411941

‎src/backend/access/nbtree/nbtinsert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.99 2003/02/23 06:17:13 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.100 2003/05/2717:49:45 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1193,7 +1193,7 @@ _bt_insert_parent(Relation rel,
11931193
BTPageOpaquelpageop;
11941194

11951195
if (!InRecovery)
1196-
elog(DEBUG1,"_bt_insert_parent: concurrent ROOT page split");
1196+
elog(DEBUG2,"_bt_insert_parent: concurrent ROOT page split");
11971197
lpageop= (BTPageOpaque)PageGetSpecialPointer(page);
11981198
/* Find the leftmost page at the next level up */
11991199
pbuf=_bt_get_endpoint(rel,lpageop->btpo.level+1, false);

‎src/backend/access/nbtree/nbtpage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.64 2003/03/04 21:51:20 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.65 2003/05/27 17:49:45 momjian Exp $
1313
*
1414
*NOTES
1515
* Postgres btree pages look like ordinary relation pages.The opaque
@@ -416,7 +416,7 @@ _bt_getbuf(Relation rel, BlockNumber blkno, int access)
416416
_bt_pageinit(page,BufferGetPageSize(buf));
417417
returnbuf;
418418
}
419-
elog(DEBUG1,"_bt_getbuf: FSM returned nonrecyclable page");
419+
elog(DEBUG2,"_bt_getbuf: FSM returned nonrecyclable page");
420420
_bt_relbuf(rel,buf);
421421
}
422422

‎src/backend/bootstrap/bootparse.y

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.56 2003/05/14 03:26:00 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.57 2003/05/27 17:49:45 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -56,15 +56,15 @@ static void
5656
do_start()
5757
{
5858
StartTransactionCommand();
59-
elog(DEBUG3,"start transaction");
59+
elog(DEBUG4,"start transaction");
6060
}
6161

6262

6363
staticvoid
6464
do_end()
6565
{
6666
CommitTransactionCommand();
67-
elog(DEBUG3,"commit transaction");
67+
elog(DEBUG4,"commit transaction");
6868
if (isatty(0))
6969
{
7070
printf("bootstrap>");
@@ -155,7 +155,7 @@ Boot_CreateStmt:
155155
{
156156
do_start();
157157
numattr =0;
158-
elog(DEBUG3,"creating%s%s relation %s...",
158+
elog(DEBUG4,"creating%s%s relation %s...",
159159
$2 ?" bootstrap" :"",
160160
$3 ?" shared" :"",
161161
LexIDStr($5));
@@ -176,7 +176,7 @@ Boot_CreateStmt:
176176
{
177177
if (boot_reldesc)
178178
{
179-
elog(DEBUG3,"create bootstrap: warning, open relation exists, closing first");
179+
elog(DEBUG4,"create bootstrap: warning, open relation exists, closing first");
180180
closerel(NULL);
181181
}
182182

@@ -186,7 +186,7 @@ Boot_CreateStmt:
186186
$3,
187187
true,
188188
true);
189-
elog(DEBUG3,"bootstrap relation created");
189+
elog(DEBUG4,"bootstrap relation created");
190190
}
191191
else
192192
{
@@ -199,7 +199,7 @@ Boot_CreateStmt:
199199
$3,
200200
ONCOMMIT_NOOP,
201201
true);
202-
elog(DEBUG3,"relation created with oid %u", id);
202+
elog(DEBUG4,"relation created with oid %u", id);
203203
}
204204
do_end();
205205
}
@@ -210,9 +210,9 @@ Boot_InsertStmt:
210210
{
211211
do_start();
212212
if ($2)
213-
elog(DEBUG3,"inserting row with oid %u...", $2);
213+
elog(DEBUG4,"inserting row with oid %u...", $2);
214214
else
215-
elog(DEBUG3,"inserting row...");
215+
elog(DEBUG4,"inserting row...");
216216
num_columns_read =0;
217217
}
218218
LPAREN boot_tuplelist RPAREN

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp