Use errmsg_internal for debug messages
authorPeter Eisentraut <[email protected]>
Wed, 17 Feb 2021 10:24:46 +0000 (11:24 +0100)
committerPeter Eisentraut <[email protected]>
Wed, 17 Feb 2021 10:33:25 +0000 (11:33 +0100)
An inconsistent set of debug-level messages was not using
errmsg_internal(), thus uselessly exposing the messages to translation
work.  Fix those.

30 files changed:
contrib/amcheck/verify_nbtree.c
contrib/pg_prewarm/autoprewarm.c
src/backend/access/transam/multixact.c
src/backend/access/transam/slru.c
src/backend/access/transam/varsup.c
src/backend/access/transam/xlog.c
src/backend/catalog/dependency.c
src/backend/catalog/index.c
src/backend/commands/indexcmds.c
src/backend/commands/subscriptioncmds.c
src/backend/commands/tablecmds.c
src/backend/jit/llvm/llvmjit.c
src/backend/libpq/be-secure.c
src/backend/parser/parse_utilcmd.c
src/backend/partitioning/partbounds.c
src/backend/port/win32_shmem.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/postmaster.c
src/backend/postmaster/syslogger.c
src/backend/replication/logical/launcher.c
src/backend/replication/syncrep.c
src/backend/replication/walsender.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/backend/storage/smgr/md.c
src/backend/storage/sync/sync.c
src/backend/tcop/postgres.c
src/backend/utils/init/miscinit.c

index b8c7793d9e06a081eb0ee6207ac0333868e4f862..4db1a64d5142e4ed34f133cf09febc3df3b38834 100644 (file)
@@ -535,7 +535,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace,
    if (metad->btm_fastroot != metad->btm_root)
        ereport(DEBUG1,
                (errcode(ERRCODE_NO_DATA),
-                errmsg("harmless fast root mismatch in index %s",
+                errmsg_internal("harmless fast root mismatch in index %s",
                        RelationGetRelationName(rel)),
                 errdetail_internal("Fast root block %u (level %u) differs from true root block %u (level %u).",
                                    metad->btm_fastroot, metad->btm_fastlevel,
@@ -721,7 +721,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
            else
                ereport(DEBUG1,
                        (errcode(ERRCODE_NO_DATA),
-                        errmsg("block %u of index \"%s\" ignored",
+                        errmsg_internal("block %u of index \"%s\" ignored",
                                current, RelationGetRelationName(state->rel))));
            goto nextpage;
        }
@@ -979,7 +979,7 @@ bt_recheck_sibling_links(BtreeCheckState *state,
            /* Report split in left sibling, not target (or new target) */
            ereport(DEBUG1,
                    (errcode(ERRCODE_INTERNAL_ERROR),
-                    errmsg("harmless concurrent page split detected in index \"%s\"",
+                    errmsg_internal("harmless concurrent page split detected in index \"%s\"",
                            RelationGetRelationName(state->rel)),
                     errdetail_internal("Block=%u new right sibling=%u original right sibling=%u.",
                                        leftcurrent, newtargetblock,
@@ -1605,7 +1605,7 @@ bt_right_page_check_scankey(BtreeCheckState *state)
        targetnext = opaque->btpo_next;
        ereport(DEBUG1,
                (errcode(ERRCODE_NO_DATA),
-                errmsg("level %u leftmost page of index \"%s\" was found deleted or half dead",
+                errmsg_internal("level %u leftmost page of index \"%s\" was found deleted or half dead",
                        opaque->btpo.level, RelationGetRelationName(state->rel)),
                 errdetail_internal("Deleted page found when building scankey from right sibling.")));
 
@@ -1733,7 +1733,7 @@ bt_right_page_check_scankey(BtreeCheckState *state)
         */
        ereport(DEBUG1,
                (errcode(ERRCODE_NO_DATA),
-                errmsg("%s block %u of index \"%s\" has no first data item",
+                errmsg_internal("%s block %u of index \"%s\" has no first data item",
                        P_ISLEAF(opaque) ? "leaf" : "internal", targetnext,
                        RelationGetRelationName(state->rel))));
        return NULL;
@@ -2287,7 +2287,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
    {
        ereport(DEBUG1,
                (errcode(ERRCODE_NO_DATA),
-                errmsg("harmless interrupted page split detected in index %s",
+                errmsg_internal("harmless interrupted page split detected in index %s",
                        RelationGetRelationName(state->rel)),
                 errdetail_internal("Block=%u level=%u left sibling=%u page lsn=%X/%X.",
                                    blkno, opaque->btpo.level,
index 4c08d2b386b9c383b7a56f41ead356625564b3ae..b3f73ea92d6519b43dd481817360fa7b900aa99c 100644 (file)
@@ -697,7 +697,7 @@ apw_dump_now(bool is_bgworker, bool dump_unlogged)
    apw_state->pid_using_dumpfile = InvalidPid;
 
    ereport(DEBUG1,
-           (errmsg("wrote block details for %d blocks", num_blocks)));
+           (errmsg_internal("wrote block details for %d blocks", num_blocks)));
    return num_blocks;
 }
 
index 7dcfa02323698b3e14d39cae8255dcba47660b59..1f9f1a1fa10cab41dcb8fb3d3eac282e3ad3c17b 100644 (file)
@@ -2277,7 +2277,7 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid,
 
    /* Log the info */
    ereport(DEBUG1,
-           (errmsg("MultiXactId wrap limit is %u, limited by database with OID %u",
+           (errmsg_internal("MultiXactId wrap limit is %u, limited by database with OID %u",
                    multiWrapLimit, oldest_datoid)));
 
    /*
@@ -2611,7 +2611,7 @@ SetOffsetVacuumLimit(bool is_startup)
 
        if (oldestOffsetKnown)
            ereport(DEBUG1,
-                   (errmsg("oldest MultiXactId member is at offset %u",
+                   (errmsg_internal("oldest MultiXactId member is at offset %u",
                            oldestOffset)));
        else
            ereport(LOG,
@@ -2640,7 +2640,7 @@ SetOffsetVacuumLimit(bool is_startup)
                    (errmsg("MultiXact member wraparound protections are now enabled")));
 
        ereport(DEBUG1,
-               (errmsg("MultiXact member stop limit is now %u based on MultiXact %u",
+               (errmsg_internal("MultiXact member stop limit is now %u based on MultiXact %u",
                        offsetStopLimit, oldestMultiXactId)));
    }
    else if (prevOldestOffsetKnown)
index e49e06e896414a23fe96808ef194d73625ff577c..82149ad7821cd1817f64894944a4d4cbb418b1dd 100644 (file)
@@ -1315,7 +1315,7 @@ SlruInternalDeleteSegment(SlruCtl ctl, int segno)
 
    /* Unlink the file. */
    SlruFileName(ctl, path, segno);
-   ereport(DEBUG2, (errmsg("removing file \"%s\"", path)));
+   ereport(DEBUG2, (errmsg_internal("removing file \"%s\"", path)));
    unlink(path);
 }
 
index 2264c2c849cac4a4d42719b993a87c9aeacaa66d..142da4aaff3cce9d8951b58e23660513c586ad1f 100644 (file)
@@ -425,7 +425,7 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
 
    /* Log the info */
    ereport(DEBUG1,
-           (errmsg("transaction ID wrap limit is %u, limited by database with OID %u",
+           (errmsg_internal("transaction ID wrap limit is %u, limited by database with OID %u",
                    xidWrapLimit, oldest_datoid)));
 
    /*
index 8e3b5df7dcb86bef4c7768d3796719d217281e68..e0c37f73f3e97cacc1dc136ce73ad3eb09cf4d81 100644 (file)
@@ -2837,7 +2837,7 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force)
            minRecoveryPointTLI = newMinRecoveryPointTLI;
 
            ereport(DEBUG2,
-                   (errmsg("updated min recovery point to %X/%X on timeline %u",
+                   (errmsg_internal("updated min recovery point to %X/%X on timeline %u",
                            (uint32) (minRecoveryPoint >> 32),
                            (uint32) minRecoveryPoint,
                            newMinRecoveryPointTLI)));
@@ -4209,7 +4209,7 @@ RemoveXlogFile(const char *segname, XLogSegNo recycleSegNo,
                               true, recycleSegNo, true))
    {
        ereport(DEBUG2,
-               (errmsg("recycled write-ahead log file \"%s\"",
+               (errmsg_internal("recycled write-ahead log file \"%s\"",
                        segname)));
        CheckpointStats.ckpt_segs_recycled++;
        /* Needn't recheck that slot on future iterations */
@@ -4221,7 +4221,7 @@ RemoveXlogFile(const char *segname, XLogSegNo recycleSegNo,
        int         rc;
 
        ereport(DEBUG2,
-               (errmsg("removing write-ahead log file \"%s\"",
+               (errmsg_internal("removing write-ahead log file \"%s\"",
                        segname)));
 
 #ifdef WIN32
@@ -6597,7 +6597,7 @@ StartupXLOG(void)
            memcpy(&checkPoint, XLogRecGetData(xlogreader), sizeof(CheckPoint));
            wasShutdown = ((record->xl_info & ~XLR_INFO_MASK) == XLOG_CHECKPOINT_SHUTDOWN);
            ereport(DEBUG1,
-                   (errmsg("checkpoint record is at %X/%X",
+                   (errmsg_internal("checkpoint record is at %X/%X",
                            (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
            InRecovery = true;  /* force recovery even if SHUTDOWNED */
 
@@ -6730,7 +6730,7 @@ StartupXLOG(void)
        if (record != NULL)
        {
            ereport(DEBUG1,
-                   (errmsg("checkpoint record is at %X/%X",
+                   (errmsg_internal("checkpoint record is at %X/%X",
                            (uint32) (checkPointLoc >> 32), (uint32) checkPointLoc)));
        }
        else
@@ -7118,7 +7118,7 @@ StartupXLOG(void)
            int         nxids;
 
            ereport(DEBUG1,
-                   (errmsg("initializing for hot standby")));
+                   (errmsg_internal("initializing for hot standby")));
 
            InitRecoveryTransactionEnvironment();
 
@@ -8933,7 +8933,7 @@ CreateCheckPoint(int flags)
            WALInsertLockRelease();
            END_CRIT_SECTION();
            ereport(DEBUG1,
-                   (errmsg("checkpoint skipped because system is idle")));
+                   (errmsg_internal("checkpoint skipped because system is idle")));
            return;
        }
    }
@@ -9399,7 +9399,7 @@ CreateRestartPoint(int flags)
    if (!RecoveryInProgress())
    {
        ereport(DEBUG2,
-               (errmsg("skipping restartpoint, recovery has already ended")));
+               (errmsg_internal("skipping restartpoint, recovery has already ended")));
        return false;
    }
 
@@ -9421,7 +9421,7 @@ CreateRestartPoint(int flags)
        lastCheckPoint.redo <= ControlFile->checkPointCopy.redo)
    {
        ereport(DEBUG2,
-               (errmsg("skipping restartpoint, already performed at %X/%X",
+               (errmsg_internal("skipping restartpoint, already performed at %X/%X",
                        (uint32) (lastCheckPoint.redo >> 32),
                        (uint32) lastCheckPoint.redo)));
 
@@ -11763,12 +11763,12 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired,
     */
    if (fscanf(lfp, "START TIME: %127[^\n]\n", backuptime) == 1)
        ereport(DEBUG1,
-               (errmsg("backup time %s in file \"%s\"",
+               (errmsg_internal("backup time %s in file \"%s\"",
                        backuptime, BACKUP_LABEL_FILE)));
 
    if (fscanf(lfp, "LABEL: %1023[^\n]\n", backuplabel) == 1)
        ereport(DEBUG1,
-               (errmsg("backup label %s in file \"%s\"",
+               (errmsg_internal("backup label %s in file \"%s\"",
                        backuplabel, BACKUP_LABEL_FILE)));
 
    /*
@@ -11785,7 +11785,7 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired,
                               tli_from_file, tli_from_walseg)));
 
        ereport(DEBUG1,
-               (errmsg("backup timeline %u in file \"%s\"",
+               (errmsg_internal("backup timeline %u in file \"%s\"",
                        tli_from_file, BACKUP_LABEL_FILE)));
    }
 
index 132573362497e7c20eb08bbb2bf6a231b7dcb481..8d8e926c21c79dad6e275350282173bb4821d167 100644 (file)
@@ -1198,7 +1198,7 @@ reportDependentObjects(const ObjectAddresses *targetObjects,
             * log_min_messages are different.
             */
            ereport(DEBUG2,
-                   (errmsg("drop auto-cascades to %s",
+                   (errmsg_internal("drop auto-cascades to %s",
                            objDesc)));
        }
        else if (behavior == DROP_RESTRICT)
index 151493774868a51783783ca4a87f6ece748344fb..b4ab0b88ad09e12a99ce1188d2a90f3f32c8e524 100644 (file)
@@ -3081,14 +3081,12 @@ index_build(Relation heapRelation,
 
    if (indexInfo->ii_ParallelWorkers == 0)
        ereport(DEBUG1,
-               (errmsg("building index \"%s\" on table \"%s\" serially",
+               (errmsg_internal("building index \"%s\" on table \"%s\" serially",
                        RelationGetRelationName(indexRelation),
                        RelationGetRelationName(heapRelation))));
    else
        ereport(DEBUG1,
-               (errmsg_plural("building index \"%s\" on table \"%s\" with request for %d parallel worker",
-                              "building index \"%s\" on table \"%s\" with request for %d parallel workers",
-                              indexInfo->ii_ParallelWorkers,
+               (errmsg_internal("building index \"%s\" on table \"%s\" with request for %d parallel workers",
                               RelationGetRelationName(indexRelation),
                               RelationGetRelationName(heapRelation),
                               indexInfo->ii_ParallelWorkers)));
index 127ba7835dab1d15e9227ca5ec24793d53df6330..e1bed087d7cb9169ecaa8b98851173921e118daf 100644 (file)
@@ -1085,7 +1085,7 @@ DefineIndex(Oid relationId,
        }
 
        ereport(DEBUG1,
-               (errmsg("%s %s will create implicit index \"%s\" for table \"%s\"",
+               (errmsg_internal("%s %s will create implicit index \"%s\" for table \"%s\"",
                        is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /",
                        constraint_type,
                        indexRelationName, RelationGetRelationName(rel))));
index e5ae4534ae4fcbf8fd5c33c420c23682b965e952..bfd3514546a54b1e33815d23100ee586babdaaa8 100644 (file)
@@ -647,7 +647,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data)
                                        copy_data ? SUBREL_STATE_INIT : SUBREL_STATE_READY,
                                        InvalidXLogRecPtr);
                ereport(DEBUG1,
-                       (errmsg("table \"%s.%s\" added to subscription \"%s\"",
+                       (errmsg_internal("table \"%s.%s\" added to subscription \"%s\"",
                                rv->schemaname, rv->relname, sub->name)));
            }
        }
@@ -721,7 +721,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data)
                }
 
                ereport(DEBUG1,
-                       (errmsg("table \"%s.%s\" removed from subscription \"%s\"",
+                       (errmsg_internal("table \"%s.%s\" removed from subscription \"%s\"",
                                get_namespace_name(get_rel_namespace(relid)),
                                get_rel_name(relid),
                                sub->name)));
index 420991e31539c1b787c7991219df9e8ad6e75213..b2457a6924564f609c1f102350e452980cb3facc 100644 (file)
@@ -5399,11 +5399,11 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode)
 
        if (newrel)
            ereport(DEBUG1,
-                   (errmsg("rewriting table \"%s\"",
+                   (errmsg_internal("rewriting table \"%s\"",
                            RelationGetRelationName(oldrel))));
        else
            ereport(DEBUG1,
-                   (errmsg("verifying table \"%s\"",
+                   (errmsg_internal("verifying table \"%s\"",
                            RelationGetRelationName(oldrel))));
 
        if (newrel)
@@ -7016,7 +7016,7 @@ NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr)
    if (ConstraintImpliedByRelConstraint(rel, list_make1(nnulltest), NIL))
    {
        ereport(DEBUG1,
-               (errmsg("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls",
+               (errmsg_internal("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls",
                        RelationGetRelationName(rel), NameStr(attr->attname))));
        return true;
    }
@@ -10565,7 +10565,7 @@ validateForeignKeyConstraint(char *conname,
    MemoryContext perTupCxt;
 
    ereport(DEBUG1,
-           (errmsg("validating foreign key constraint \"%s\"", conname)));
+           (errmsg_internal("validating foreign key constraint \"%s\"", conname)));
 
    /*
     * Build a trigger call structure; we'll need it either way.
@@ -16294,11 +16294,11 @@ QueuePartitionConstraintValidation(List **wqueue, Relation scanrel,
    {
        if (!validate_default)
            ereport(DEBUG1,
-                   (errmsg("partition constraint for table \"%s\" is implied by existing constraints",
+                   (errmsg_internal("partition constraint for table \"%s\" is implied by existing constraints",
                            RelationGetRelationName(scanrel))));
        else
            ereport(DEBUG1,
-                   (errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
+                   (errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints",
                            RelationGetRelationName(scanrel))));
        return;
    }
index b0789a5fb80129b0976cb6676d6b1a0a1f102c31..98a27f08bfd0f199c1b650cbbd8f73ab58166d7c 100644 (file)
@@ -768,7 +768,7 @@ llvm_compile_module(LLVMJitContext *context)
    MemoryContextSwitchTo(oldcontext);
 
    ereport(DEBUG1,
-           (errmsg("time to inline: %.3fs, opt: %.3fs, emit: %.3fs",
+           (errmsg_internal("time to inline: %.3fs, opt: %.3fs, emit: %.3fs",
                    INSTR_TIME_GET_DOUBLE(context->base.instr.inlining_counter),
                    INSTR_TIME_GET_DOUBLE(context->base.instr.optimization_counter),
                    INSTR_TIME_GET_DOUBLE(context->base.instr.emission_counter)),
index 4cf139a223fdc4e83f334c854f94fc6263531e89..7155b3388524504c875f117358e5f79c9113caf8 100644 (file)
@@ -119,7 +119,7 @@ secure_open_server(Port *port)
    r = be_tls_open_server(port);
 
    ereport(DEBUG2,
-           (errmsg("SSL connection from \"%s\"",
+           (errmsg_internal("SSL connection from \"%s\"",
                    port->peer_cn ? port->peer_cn : "(anonymous)")));
 #endif
 
index b31f3afa0391a79a8ea73fe0b13d75412b6e6105..75266caeb4bb50a635a3572c3fde0a3719516702 100644 (file)
@@ -443,7 +443,7 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column,
    }
 
    ereport(DEBUG1,
-           (errmsg("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"",
+           (errmsg_internal("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"",
                    cxt->stmtType, sname,
                    cxt->relation->relname, column->colname)));
 
index 0c3f212ff21e6433c8cab81b27663d78dc9d8c07..a60c379725d1d50390548bbbf01073662c6ab2cc 100644 (file)
@@ -3144,7 +3144,7 @@ check_default_partition_contents(Relation parent, Relation default_rel,
    if (PartConstraintImpliedByRelConstraint(default_rel, def_part_constraints))
    {
        ereport(DEBUG1,
-               (errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
+               (errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints",
                        RelationGetRelationName(default_rel))));
        return;
    }
@@ -3195,7 +3195,7 @@ check_default_partition_contents(Relation parent, Relation default_rel,
                                                     def_part_constraints))
            {
                ereport(DEBUG1,
-                       (errmsg("updated partition constraint for default partition \"%s\" is implied by existing constraints",
+                       (errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints",
                                RelationGetRelationName(part_rel))));
 
                table_close(part_rel, NoLock);
index ab2534351d7c5000e09ff6e08fa60c8eabb226d6..6140ee7617fa86ad9e415498bf26404085a8fb65 100644 (file)
@@ -236,12 +236,12 @@ PGSharedMemoryCreate(Size size,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                     errmsg("the processor does not support large pages")));
            ereport(DEBUG1,
-                   (errmsg("disabling huge pages")));
+                   (errmsg_internal("disabling huge pages")));
        }
        else if (!EnableLockPagesPrivilege(huge_pages == HUGE_PAGES_ON ? FATAL : DEBUG1))
        {
            ereport(DEBUG1,
-                   (errmsg("disabling huge pages")));
+                   (errmsg_internal("disabling huge pages")));
        }
        else
        {
index 8da5e5c9c39da787cb4bc01cd7b846b21752e886..23ef23c13ebe2d0e6fbfc6e99f1a05657d044fd2 100644 (file)
@@ -443,7 +443,7 @@ AutoVacLauncherMain(int argc, char *argv[])
    init_ps_display(NULL);
 
    ereport(DEBUG1,
-           (errmsg("autovacuum launcher started")));
+           (errmsg_internal("autovacuum launcher started")));
 
    if (PostAuthDelay)
        pg_usleep(PostAuthDelay * 1000000L);
@@ -847,7 +847,7 @@ static void
 AutoVacLauncherShutdown(void)
 {
    ereport(DEBUG1,
-           (errmsg("autovacuum launcher shutting down")));
+           (errmsg_internal("autovacuum launcher shutting down")));
    AutoVacuumShmem->av_launcherpid = 0;
 
    proc_exit(0);               /* done */
@@ -1703,7 +1703,7 @@ AutoVacWorkerMain(int argc, char *argv[])
        SetProcessingMode(NormalProcessing);
        set_ps_display(dbname);
        ereport(DEBUG1,
-               (errmsg("autovacuum: processing database \"%s\"", dbname)));
+               (errmsg_internal("autovacuum: processing database \"%s\"", dbname)));
 
        if (PostAuthDelay)
            pg_usleep(PostAuthDelay * 1000000L);
index dd3dad3de35fa9fd5cd4313a22657cc20236a59f..6fdea3fc2d2b99c3d011a02926d64977e8d0de29 100644 (file)
@@ -402,7 +402,7 @@ BackgroundWorkerStateChange(bool allow_new_workers)
 
        /* Log it! */
        ereport(DEBUG1,
-               (errmsg("registering background worker \"%s\"",
+               (errmsg_internal("registering background worker \"%s\"",
                        rw->rw_worker.bgw_name)));
 
        slist_push_head(&BackgroundWorkerList, &rw->rw_lnode);
@@ -434,7 +434,7 @@ ForgetBackgroundWorker(slist_mutable_iter *cur)
    slot->in_use = false;
 
    ereport(DEBUG1,
-           (errmsg("unregistering background worker \"%s\"",
+           (errmsg_internal("unregistering background worker \"%s\"",
                    rw->rw_worker.bgw_name)));
 
    slist_delete_current(cur);
@@ -897,7 +897,7 @@ RegisterBackgroundWorker(BackgroundWorker *worker)
 
    if (!IsUnderPostmaster)
        ereport(DEBUG1,
-               (errmsg("registering background worker \"%s\"", worker->bgw_name)));
+               (errmsg_internal("registering background worker \"%s\"", worker->bgw_name)));
 
    if (!process_shared_preload_libraries_in_progress &&
        strcmp(worker->bgw_library_name, "postgres") != 0)
index 54a818bf611a6a3bfc1efd8f28b0074274ea387e..76f9f98ebb46a2d15cd53fb576f39ace4e5d4498 100644 (file)
@@ -1226,7 +1226,7 @@ CompactCheckpointerRequestQueue(void)
        CheckpointerShmem->requests[preserve_count++] = CheckpointerShmem->requests[n];
    }
    ereport(DEBUG1,
-           (errmsg("compacted fsync request queue from %d entries to %d entries",
+           (errmsg_internal("compacted fsync request queue from %d entries to %d entries",
                    CheckpointerShmem->num_requests, preserve_count)));
    CheckpointerShmem->num_requests = preserve_count;
 
index 7de27ee4e0171863faca2f24d62488b773a7636e..9568dafbe24abcfe163edf72fcc66627f1519298 100644 (file)
@@ -5787,7 +5787,7 @@ do_start_bgworker(RegisteredBgWorker *rw)
    }
 
    ereport(DEBUG1,
-           (errmsg("starting background worker process \"%s\"",
+           (errmsg_internal("starting background worker process \"%s\"",
                    rw->rw_worker.bgw_name)));
 
 #ifdef EXEC_BACKEND
index d3bcc4b118e7efbc48e22f8856678771e8e7bb7a..e7a7486c35433db617ff2b4ca77c074a28c09d59 100644 (file)
@@ -518,7 +518,7 @@ SysLoggerMain(int argc, char *argv[])
             * it DEBUG1 to suppress in normal use.
             */
            ereport(DEBUG1,
-                   (errmsg("logger shutting down")));
+                   (errmsg_internal("logger shutting down")));
 
            /*
             * Normal exit from the syslogger is here.  Note that we
index 58082dde186e2807c25302763558250b5f6e1d62..cb462a052ad473a0acb5d3b51653a9387765e066 100644 (file)
@@ -282,7 +282,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid,
    TimestampTz now;
 
    ereport(DEBUG1,
-           (errmsg("starting logical replication worker for subscription \"%s\"",
+           (errmsg_internal("starting logical replication worker for subscription \"%s\"",
                    subname)));
 
    /* Report this after the initial starting message for consistency. */
@@ -805,7 +805,7 @@ ApplyLauncherMain(Datum main_arg)
    TimestampTz last_start_time = 0;
 
    ereport(DEBUG1,
-           (errmsg("logical replication launcher started")));
+           (errmsg_internal("logical replication launcher started")));
 
    before_shmem_exit(logicalrep_launcher_onexit, (Datum) 0);
 
index 1c1bf1605285b01cebeffe264415f97cc9284905..f765002e0dca38a084b389f576f1a87d483ab265 100644 (file)
@@ -425,7 +425,7 @@ SyncRepInitConfig(void)
        SpinLockRelease(&MyWalSnd->mutex);
 
        ereport(DEBUG1,
-               (errmsg("standby \"%s\" now has synchronous standby priority %u",
+               (errmsg_internal("standby \"%s\" now has synchronous standby priority %u",
                        application_name, priority)));
    }
 }
index 8545c6c423170b28c395f3f4992ae33098db2b6f..64167fe3a6777996eee97191175ffdba4de2fb69 100644 (file)
@@ -2319,7 +2319,7 @@ WalSndLoop(WalSndSendDataCallback send_data)
            if (MyWalSnd->state == WALSNDSTATE_CATCHUP)
            {
                ereport(DEBUG1,
-                       (errmsg("\"%s\" has now caught up with upstream server",
+                       (errmsg_internal("\"%s\" has now caught up with upstream server",
                                application_name)));
                WalSndSetState(WALSNDSTATE_STREAMING);
            }
index 074df5b38c59c29733f3dfa632af7ad284debd4c..d493aeef0fc444626d179d9312850adc2eb04a8d 100644 (file)
@@ -1602,7 +1602,7 @@ GetSafeSnapshot(Snapshot origSnapshot)
        /* else, need to retry... */
        ereport(DEBUG2,
                (errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
-                errmsg("deferrable snapshot was unsafe; trying a new one")));
+                errmsg_internal("deferrable snapshot was unsafe; trying a new one")));
        ReleasePredicateLocks(false, false);
    }
 
index 0884909a2206ebfe5c96a5881d99d6f6c6f7ec35..db9529a534a35370e45e15aeaa3a4cd0ee18bd7d 100644 (file)
@@ -1413,13 +1413,13 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
                    initStringInfo(&logbuf);
                    DescribeLockTag(&locktagbuf, &locktag_copy);
                    appendStringInfo(&logbuf,
-                                    _("Process %d waits for %s on %s."),
+                                    "Process %d waits for %s on %s.",
                                     MyProcPid,
                                     GetLockmodeName(lockmethod_copy, lockmode),
                                     locktagbuf.data);
 
                    ereport(DEBUG1,
-                           (errmsg("sending cancel to blocking autovacuum PID %d",
+                           (errmsg_internal("sending cancel to blocking autovacuum PID %d",
                                    pid),
                             errdetail_log("%s", logbuf.data)));
 
index 0643d714fb1c5e46cebe9e87f4568b524a34b81b..1e12cfad8e855ab4e3dd56b0947a9dacf2c6ba67 100644 (file)
@@ -983,7 +983,7 @@ register_dirty_segment(SMgrRelation reln, ForkNumber forknum, MdfdVec *seg)
    if (!RegisterSyncRequest(&tag, SYNC_REQUEST, false /* retryOnError */ ))
    {
        ereport(DEBUG1,
-               (errmsg("could not forward fsync request because request queue is full")));
+               (errmsg_internal("could not forward fsync request because request queue is full")));
 
        if (FileSync(seg->mdfd_vfd, WAIT_EVENT_DATA_FILE_SYNC) < 0)
            ereport(data_sync_elevel(ERROR),
index fe143151cc524d623c9b8f4de9e87a1bd1f0912f..708215614db656daad8c1b92df91ff80ed3d1231 100644 (file)
@@ -419,7 +419,7 @@ ProcessSyncRequests(void)
                else
                    ereport(DEBUG1,
                            (errcode_for_file_access(),
-                            errmsg("could not fsync file \"%s\" but retrying: %m",
+                            errmsg_internal("could not fsync file \"%s\" but retrying: %m",
                                    path)));
 
                /*
index cb5a96117f6cd1b6a224421ddae8642798a47c24..bb5ccb4578b7d66d1247eccd01559dbbfd36cb19 100644 (file)
@@ -353,7 +353,7 @@ SocketBackend(StringInfo inBuf)
            whereToSendOutput = DestNone;
            ereport(DEBUG1,
                    (errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST),
-                    errmsg("unexpected EOF on client connection")));
+                    errmsg_internal("unexpected EOF on client connection")));
        }
        return qtype;
    }
@@ -389,7 +389,7 @@ SocketBackend(StringInfo inBuf)
                        whereToSendOutput = DestNone;
                        ereport(DEBUG1,
                                (errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST),
-                                errmsg("unexpected EOF on client connection")));
+                                errmsg_internal("unexpected EOF on client connection")));
                    }
                    return EOF;
                }
@@ -416,7 +416,7 @@ SocketBackend(StringInfo inBuf)
                        whereToSendOutput = DestNone;
                        ereport(DEBUG1,
                                (errcode(ERRCODE_CONNECTION_DOES_NOT_EXIST),
-                                errmsg("unexpected EOF on client connection")));
+                                errmsg_internal("unexpected EOF on client connection")));
                    }
                    return EOF;
                }
@@ -1375,7 +1375,7 @@ exec_parse_message(const char *query_string,  /* string to execute */
        ResetUsage();
 
    ereport(DEBUG2,
-           (errmsg("parse %s: %s",
+           (errmsg_internal("parse %s: %s",
                    *stmt_name ? stmt_name : "<unnamed>",
                    query_string)));
 
@@ -1631,7 +1631,7 @@ exec_bind_message(StringInfo input_message)
    stmt_name = pq_getmsgstring(input_message);
 
    ereport(DEBUG2,
-           (errmsg("bind %s to %s",
+           (errmsg_internal("bind %s to %s",
                    *portal_name ? portal_name : "<unnamed>",
                    *stmt_name ? stmt_name : "<unnamed>")));
 
@@ -3092,7 +3092,7 @@ ProcessInterrupts(void)
        else if (IsLogicalLauncher())
        {
            ereport(DEBUG1,
-                   (errmsg("logical replication launcher shutting down")));
+                   (errmsg_internal("logical replication launcher shutting down")));
 
            /*
             * The logical replication launcher can be stopped at any time.
index 0f67b99cc55348132bf927c4494422937dcdc138..734c66d4e84c8ff2f0e2872d149e999345673bba 100644 (file)
@@ -1641,7 +1641,7 @@ load_libraries(const char *libraries, const char *gucname, bool restricted)
        }
        load_file(filename, restricted);
        ereport(DEBUG1,
-               (errmsg("loaded library \"%s\"", filename)));
+               (errmsg_internal("loaded library \"%s\"", filename)));
        if (expanded)
            pfree(expanded);
    }