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

Commit0e392fc

Browse files
committed
Use errmsg_internal for debug messages
An inconsistent set of debug-level messages was not usingerrmsg_internal(), thus uselessly exposing the messages to translationwork. Fix those.
1 parente6b8e83 commit0e392fc

File tree

30 files changed

+68
-70
lines changed

30 files changed

+68
-70
lines changed

‎contrib/amcheck/verify_nbtree.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
535535
if (metad->btm_fastroot!=metad->btm_root)
536536
ereport(DEBUG1,
537537
(errcode(ERRCODE_NO_DATA),
538-
errmsg("harmless fast root mismatch in index %s",
538+
errmsg_internal("harmless fast root mismatch in index %s",
539539
RelationGetRelationName(rel)),
540540
errdetail_internal("Fast root block %u (level %u) differs from true root block %u (level %u).",
541541
metad->btm_fastroot,metad->btm_fastlevel,
@@ -721,7 +721,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
721721
else
722722
ereport(DEBUG1,
723723
(errcode(ERRCODE_NO_DATA),
724-
errmsg("block %u of index \"%s\" ignored",
724+
errmsg_internal("block %u of index \"%s\" ignored",
725725
current,RelationGetRelationName(state->rel))));
726726
gotonextpage;
727727
}
@@ -979,7 +979,7 @@ bt_recheck_sibling_links(BtreeCheckState *state,
979979
/* Report split in left sibling, not target (or new target) */
980980
ereport(DEBUG1,
981981
(errcode(ERRCODE_INTERNAL_ERROR),
982-
errmsg("harmless concurrent page split detected in index \"%s\"",
982+
errmsg_internal("harmless concurrent page split detected in index \"%s\"",
983983
RelationGetRelationName(state->rel)),
984984
errdetail_internal("Block=%u new right sibling=%u original right sibling=%u.",
985985
leftcurrent,newtargetblock,
@@ -1605,7 +1605,7 @@ bt_right_page_check_scankey(BtreeCheckState *state)
16051605
targetnext=opaque->btpo_next;
16061606
ereport(DEBUG1,
16071607
(errcode(ERRCODE_NO_DATA),
1608-
errmsg("level %u leftmost page of index \"%s\" was found deleted or half dead",
1608+
errmsg_internal("level %u leftmost page of index \"%s\" was found deleted or half dead",
16091609
opaque->btpo.level,RelationGetRelationName(state->rel)),
16101610
errdetail_internal("Deleted page found when building scankey from right sibling.")));
16111611

@@ -1733,7 +1733,7 @@ bt_right_page_check_scankey(BtreeCheckState *state)
17331733
*/
17341734
ereport(DEBUG1,
17351735
(errcode(ERRCODE_NO_DATA),
1736-
errmsg("%s block %u of index \"%s\" has no first data item",
1736+
errmsg_internal("%s block %u of index \"%s\" has no first data item",
17371737
P_ISLEAF(opaque) ?"leaf" :"internal",targetnext,
17381738
RelationGetRelationName(state->rel))));
17391739
returnNULL;
@@ -2287,7 +2287,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
22872287
{
22882288
ereport(DEBUG1,
22892289
(errcode(ERRCODE_NO_DATA),
2290-
errmsg("harmless interrupted page split detected in index %s",
2290+
errmsg_internal("harmless interrupted page split detected in index %s",
22912291
RelationGetRelationName(state->rel)),
22922292
errdetail_internal("Block=%u level=%u left sibling=%u page lsn=%X/%X.",
22932293
blkno,opaque->btpo.level,

‎contrib/pg_prewarm/autoprewarm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ apw_dump_now(bool is_bgworker, bool dump_unlogged)
697697
apw_state->pid_using_dumpfile=InvalidPid;
698698

699699
ereport(DEBUG1,
700-
(errmsg("wrote block details for %d blocks",num_blocks)));
700+
(errmsg_internal("wrote block details for %d blocks",num_blocks)));
701701
returnnum_blocks;
702702
}
703703

‎src/backend/access/transam/multixact.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2277,7 +2277,7 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid,
22772277

22782278
/* Log the info */
22792279
ereport(DEBUG1,
2280-
(errmsg("MultiXactId wrap limit is %u, limited by database with OID %u",
2280+
(errmsg_internal("MultiXactId wrap limit is %u, limited by database with OID %u",
22812281
multiWrapLimit,oldest_datoid)));
22822282

22832283
/*
@@ -2611,7 +2611,7 @@ SetOffsetVacuumLimit(bool is_startup)
26112611

26122612
if (oldestOffsetKnown)
26132613
ereport(DEBUG1,
2614-
(errmsg("oldest MultiXactId member is at offset %u",
2614+
(errmsg_internal("oldest MultiXactId member is at offset %u",
26152615
oldestOffset)));
26162616
else
26172617
ereport(LOG,
@@ -2640,7 +2640,7 @@ SetOffsetVacuumLimit(bool is_startup)
26402640
(errmsg("MultiXact member wraparound protections are now enabled")));
26412641

26422642
ereport(DEBUG1,
2643-
(errmsg("MultiXact member stop limit is now %u based on MultiXact %u",
2643+
(errmsg_internal("MultiXact member stop limit is now %u based on MultiXact %u",
26442644
offsetStopLimit,oldestMultiXactId)));
26452645
}
26462646
elseif (prevOldestOffsetKnown)

‎src/backend/access/transam/slru.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ SlruInternalDeleteSegment(SlruCtl ctl, int segno)
13151315

13161316
/* Unlink the file. */
13171317
SlruFileName(ctl,path,segno);
1318-
ereport(DEBUG2, (errmsg("removing file \"%s\"",path)));
1318+
ereport(DEBUG2, (errmsg_internal("removing file \"%s\"",path)));
13191319
unlink(path);
13201320
}
13211321

‎src/backend/access/transam/varsup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
425425

426426
/* Log the info */
427427
ereport(DEBUG1,
428-
(errmsg("transaction ID wrap limit is %u, limited by database with OID %u",
428+
(errmsg_internal("transaction ID wrap limit is %u, limited by database with OID %u",
429429
xidWrapLimit,oldest_datoid)));
430430

431431
/*

‎src/backend/access/transam/xlog.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,7 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force)
28372837
minRecoveryPointTLI=newMinRecoveryPointTLI;
28382838

28392839
ereport(DEBUG2,
2840-
(errmsg("updated min recovery point to %X/%X on timeline %u",
2840+
(errmsg_internal("updated min recovery point to %X/%X on timeline %u",
28412841
(uint32) (minRecoveryPoint >>32),
28422842
(uint32)minRecoveryPoint,
28432843
newMinRecoveryPointTLI)));
@@ -4209,7 +4209,7 @@ RemoveXlogFile(const char *segname, XLogSegNo recycleSegNo,
42094209
true,recycleSegNo, true))
42104210
{
42114211
ereport(DEBUG2,
4212-
(errmsg("recycled write-ahead log file \"%s\"",
4212+
(errmsg_internal("recycled write-ahead log file \"%s\"",
42134213
segname)));
42144214
CheckpointStats.ckpt_segs_recycled++;
42154215
/* Needn't recheck that slot on future iterations */
@@ -4221,7 +4221,7 @@ RemoveXlogFile(const char *segname, XLogSegNo recycleSegNo,
42214221
intrc;
42224222

42234223
ereport(DEBUG2,
4224-
(errmsg("removing write-ahead log file \"%s\"",
4224+
(errmsg_internal("removing write-ahead log file \"%s\"",
42254225
segname)));
42264226

42274227
#ifdefWIN32
@@ -6597,7 +6597,7 @@ StartupXLOG(void)
65976597
memcpy(&checkPoint,XLogRecGetData(xlogreader),sizeof(CheckPoint));
65986598
wasShutdown= ((record->xl_info& ~XLR_INFO_MASK)==XLOG_CHECKPOINT_SHUTDOWN);
65996599
ereport(DEBUG1,
6600-
(errmsg("checkpoint record is at %X/%X",
6600+
(errmsg_internal("checkpoint record is at %X/%X",
66016601
(uint32) (checkPointLoc >>32), (uint32)checkPointLoc)));
66026602
InRecovery= true;/* force recovery even if SHUTDOWNED */
66036603

@@ -6730,7 +6730,7 @@ StartupXLOG(void)
67306730
if (record!=NULL)
67316731
{
67326732
ereport(DEBUG1,
6733-
(errmsg("checkpoint record is at %X/%X",
6733+
(errmsg_internal("checkpoint record is at %X/%X",
67346734
(uint32) (checkPointLoc >>32), (uint32)checkPointLoc)));
67356735
}
67366736
else
@@ -7118,7 +7118,7 @@ StartupXLOG(void)
71187118
intnxids;
71197119

71207120
ereport(DEBUG1,
7121-
(errmsg("initializing for hot standby")));
7121+
(errmsg_internal("initializing for hot standby")));
71227122

71237123
InitRecoveryTransactionEnvironment();
71247124

@@ -8933,7 +8933,7 @@ CreateCheckPoint(int flags)
89338933
WALInsertLockRelease();
89348934
END_CRIT_SECTION();
89358935
ereport(DEBUG1,
8936-
(errmsg("checkpoint skipped because system is idle")));
8936+
(errmsg_internal("checkpoint skipped because system is idle")));
89378937
return;
89388938
}
89398939
}
@@ -9399,7 +9399,7 @@ CreateRestartPoint(int flags)
93999399
if (!RecoveryInProgress())
94009400
{
94019401
ereport(DEBUG2,
9402-
(errmsg("skipping restartpoint, recovery has already ended")));
9402+
(errmsg_internal("skipping restartpoint, recovery has already ended")));
94039403
return false;
94049404
}
94059405

@@ -9421,7 +9421,7 @@ CreateRestartPoint(int flags)
94219421
lastCheckPoint.redo <=ControlFile->checkPointCopy.redo)
94229422
{
94239423
ereport(DEBUG2,
9424-
(errmsg("skipping restartpoint, already performed at %X/%X",
9424+
(errmsg_internal("skipping restartpoint, already performed at %X/%X",
94259425
(uint32) (lastCheckPoint.redo >>32),
94269426
(uint32)lastCheckPoint.redo)));
94279427

@@ -11763,12 +11763,12 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired,
1176311763
*/
1176411764
if (fscanf(lfp,"START TIME: %127[^\n]\n",backuptime)==1)
1176511765
ereport(DEBUG1,
11766-
(errmsg("backup time %s in file \"%s\"",
11766+
(errmsg_internal("backup time %s in file \"%s\"",
1176711767
backuptime,BACKUP_LABEL_FILE)));
1176811768

1176911769
if (fscanf(lfp,"LABEL: %1023[^\n]\n",backuplabel)==1)
1177011770
ereport(DEBUG1,
11771-
(errmsg("backup label %s in file \"%s\"",
11771+
(errmsg_internal("backup label %s in file \"%s\"",
1177211772
backuplabel,BACKUP_LABEL_FILE)));
1177311773

1177411774
/*
@@ -11785,7 +11785,7 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired,
1178511785
tli_from_file,tli_from_walseg)));
1178611786

1178711787
ereport(DEBUG1,
11788-
(errmsg("backup timeline %u in file \"%s\"",
11788+
(errmsg_internal("backup timeline %u in file \"%s\"",
1178911789
tli_from_file,BACKUP_LABEL_FILE)));
1179011790
}
1179111791

‎src/backend/catalog/dependency.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ reportDependentObjects(const ObjectAddresses *targetObjects,
11981198
* log_min_messages are different.
11991199
*/
12001200
ereport(DEBUG2,
1201-
(errmsg("drop auto-cascades to %s",
1201+
(errmsg_internal("drop auto-cascades to %s",
12021202
objDesc)));
12031203
}
12041204
elseif (behavior==DROP_RESTRICT)

‎src/backend/catalog/index.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3081,14 +3081,12 @@ index_build(Relation heapRelation,
30813081

30823082
if (indexInfo->ii_ParallelWorkers==0)
30833083
ereport(DEBUG1,
3084-
(errmsg("building index \"%s\" on table \"%s\" serially",
3084+
(errmsg_internal("building index \"%s\" on table \"%s\" serially",
30853085
RelationGetRelationName(indexRelation),
30863086
RelationGetRelationName(heapRelation))));
30873087
else
30883088
ereport(DEBUG1,
3089-
(errmsg_plural("building index \"%s\" on table \"%s\" with request for %d parallel worker",
3090-
"building index \"%s\" on table \"%s\" with request for %d parallel workers",
3091-
indexInfo->ii_ParallelWorkers,
3089+
(errmsg_internal("building index \"%s\" on table \"%s\" with request for %d parallel workers",
30923090
RelationGetRelationName(indexRelation),
30933091
RelationGetRelationName(heapRelation),
30943092
indexInfo->ii_ParallelWorkers)));

‎src/backend/commands/indexcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ DefineIndex(Oid relationId,
10851085
}
10861086

10871087
ereport(DEBUG1,
1088-
(errmsg("%s %s will create implicit index \"%s\" for table \"%s\"",
1088+
(errmsg_internal("%s %s will create implicit index \"%s\" for table \"%s\"",
10891089
is_alter_table ?"ALTER TABLE / ADD" :"CREATE TABLE /",
10901090
constraint_type,
10911091
indexRelationName,RelationGetRelationName(rel))));

‎src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data)
647647
copy_data ?SUBREL_STATE_INIT :SUBREL_STATE_READY,
648648
InvalidXLogRecPtr);
649649
ereport(DEBUG1,
650-
(errmsg("table \"%s.%s\" added to subscription \"%s\"",
650+
(errmsg_internal("table \"%s.%s\" added to subscription \"%s\"",
651651
rv->schemaname,rv->relname,sub->name)));
652652
}
653653
}
@@ -721,7 +721,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data)
721721
}
722722

723723
ereport(DEBUG1,
724-
(errmsg("table \"%s.%s\" removed from subscription \"%s\"",
724+
(errmsg_internal("table \"%s.%s\" removed from subscription \"%s\"",
725725
get_namespace_name(get_rel_namespace(relid)),
726726
get_rel_name(relid),
727727
sub->name)));

‎src/backend/commands/tablecmds.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5399,11 +5399,11 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode)
53995399

54005400
if (newrel)
54015401
ereport(DEBUG1,
5402-
(errmsg("rewriting table \"%s\"",
5402+
(errmsg_internal("rewriting table \"%s\"",
54035403
RelationGetRelationName(oldrel))));
54045404
else
54055405
ereport(DEBUG1,
5406-
(errmsg("verifying table \"%s\"",
5406+
(errmsg_internal("verifying table \"%s\"",
54075407
RelationGetRelationName(oldrel))));
54085408

54095409
if (newrel)
@@ -7016,7 +7016,7 @@ NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr)
70167016
if (ConstraintImpliedByRelConstraint(rel, list_make1(nnulltest), NIL))
70177017
{
70187018
ereport(DEBUG1,
7019-
(errmsg("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls",
7019+
(errmsg_internal("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls",
70207020
RelationGetRelationName(rel), NameStr(attr->attname))));
70217021
return true;
70227022
}
@@ -10565,7 +10565,7 @@ validateForeignKeyConstraint(char *conname,
1056510565
MemoryContext perTupCxt;
1056610566

1056710567
ereport(DEBUG1,
10568-
(errmsg("validating foreign key constraint \"%s\"", conname)));
10568+
(errmsg_internal("validating foreign key constraint \"%s\"", conname)));
1056910569

1057010570
/*
1057110571
* Build a trigger call structure; we'll need it either way.
@@ -16294,11 +16294,11 @@ QueuePartitionConstraintValidation(List **wqueue, Relation scanrel,
1629416294
{
1629516295
if (!validate_default)
1629616296
ereport(DEBUG1,
16297-
(errmsg("partition constraint for table \"%s\" is implied by existing constraints",
16297+
(errmsg_internal("partition constraint for table \"%s\" is implied by existing constraints",
1629816298
RelationGetRelationName(scanrel))));
1629916299
else
1630016300
ereport(DEBUG1,
16301-
(errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
16301+
(errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints",
1630216302
RelationGetRelationName(scanrel))));
1630316303
return;
1630416304
}

‎src/backend/jit/llvm/llvmjit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ llvm_compile_module(LLVMJitContext *context)
768768
MemoryContextSwitchTo(oldcontext);
769769

770770
ereport(DEBUG1,
771-
(errmsg("time to inline: %.3fs, opt: %.3fs, emit: %.3fs",
771+
(errmsg_internal("time to inline: %.3fs, opt: %.3fs, emit: %.3fs",
772772
INSTR_TIME_GET_DOUBLE(context->base.instr.inlining_counter),
773773
INSTR_TIME_GET_DOUBLE(context->base.instr.optimization_counter),
774774
INSTR_TIME_GET_DOUBLE(context->base.instr.emission_counter)),

‎src/backend/libpq/be-secure.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ secure_open_server(Port *port)
119119
r=be_tls_open_server(port);
120120

121121
ereport(DEBUG2,
122-
(errmsg("SSL connection from \"%s\"",
122+
(errmsg_internal("SSL connection from \"%s\"",
123123
port->peer_cn ?port->peer_cn :"(anonymous)")));
124124
#endif
125125

‎src/backend/parser/parse_utilcmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
443443
}
444444

445445
ereport(DEBUG1,
446-
(errmsg("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"",
446+
(errmsg_internal("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"",
447447
cxt->stmtType,sname,
448448
cxt->relation->relname,column->colname)));
449449

‎src/backend/partitioning/partbounds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3144,7 +3144,7 @@ check_default_partition_contents(Relation parent, Relation default_rel,
31443144
if (PartConstraintImpliedByRelConstraint(default_rel,def_part_constraints))
31453145
{
31463146
ereport(DEBUG1,
3147-
(errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
3147+
(errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints",
31483148
RelationGetRelationName(default_rel))));
31493149
return;
31503150
}
@@ -3195,7 +3195,7 @@ check_default_partition_contents(Relation parent, Relation default_rel,
31953195
def_part_constraints))
31963196
{
31973197
ereport(DEBUG1,
3198-
(errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
3198+
(errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints",
31993199
RelationGetRelationName(part_rel))));
32003200

32013201
table_close(part_rel,NoLock);

‎src/backend/port/win32_shmem.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ PGSharedMemoryCreate(Size size,
236236
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
237237
errmsg("the processor does not support large pages")));
238238
ereport(DEBUG1,
239-
(errmsg("disabling huge pages")));
239+
(errmsg_internal("disabling huge pages")));
240240
}
241241
elseif (!EnableLockPagesPrivilege(huge_pages==HUGE_PAGES_ON ?FATAL :DEBUG1))
242242
{
243243
ereport(DEBUG1,
244-
(errmsg("disabling huge pages")));
244+
(errmsg_internal("disabling huge pages")));
245245
}
246246
else
247247
{

‎src/backend/postmaster/autovacuum.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ AutoVacLauncherMain(int argc, char *argv[])
443443
init_ps_display(NULL);
444444

445445
ereport(DEBUG1,
446-
(errmsg("autovacuum launcher started")));
446+
(errmsg_internal("autovacuum launcher started")));
447447

448448
if (PostAuthDelay)
449449
pg_usleep(PostAuthDelay*1000000L);
@@ -847,7 +847,7 @@ static void
847847
AutoVacLauncherShutdown(void)
848848
{
849849
ereport(DEBUG1,
850-
(errmsg("autovacuum launcher shutting down")));
850+
(errmsg_internal("autovacuum launcher shutting down")));
851851
AutoVacuumShmem->av_launcherpid=0;
852852

853853
proc_exit(0);/* done */
@@ -1703,7 +1703,7 @@ AutoVacWorkerMain(int argc, char *argv[])
17031703
SetProcessingMode(NormalProcessing);
17041704
set_ps_display(dbname);
17051705
ereport(DEBUG1,
1706-
(errmsg("autovacuum: processing database \"%s\"",dbname)));
1706+
(errmsg_internal("autovacuum: processing database \"%s\"",dbname)));
17071707

17081708
if (PostAuthDelay)
17091709
pg_usleep(PostAuthDelay*1000000L);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp