Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 91118f1

Browse files
committed
Reduce log level for background worker events from LOG to DEBUG1.
Per discussion, LOG is just too chatty for something that will happen as routinely as this. Pavel Stehule
1 parent 1b468a1 commit 91118f1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/backend/postmaster/bgworker.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ BackgroundWorkerStateChange(void)
341341
rw->rw_terminate = false;
342342

343343
/* Log it! */
344-
ereport(LOG,
344+
ereport(DEBUG1,
345345
(errmsg("registering background worker \"%s\"",
346346
rw->rw_worker.bgw_name)));
347347

@@ -370,7 +370,7 @@ ForgetBackgroundWorker(slist_mutable_iter *cur)
370370
slot = &BackgroundWorkerData->slot[rw->rw_shmem_slot];
371371
slot->in_use = false;
372372

373-
ereport(LOG,
373+
ereport(DEBUG1,
374374
(errmsg("unregistering background worker \"%s\"",
375375
rw->rw_worker.bgw_name)));
376376

@@ -741,7 +741,7 @@ RegisterBackgroundWorker(BackgroundWorker *worker)
741741
static int numworkers = 0;
742742

743743
if (!IsUnderPostmaster)
744-
ereport(LOG,
744+
ereport(DEBUG1,
745745
(errmsg("registering background worker \"%s\"", worker->bgw_name)));
746746

747747
if (!process_shared_preload_libraries_in_progress)

src/backend/postmaster/postmaster.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,8 @@ CleanupBackgroundWorker(int pid,
29612961
rw->rw_child_slot = 0;
29622962
ReportBackgroundWorkerPID(rw); /* report child death */
29632963

2964-
LogChildExit(LOG, namebuf, pid, exitstatus);
2964+
LogChildExit(EXIT_STATUS_0(exitstatus) ? DEBUG1 : LOG,
2965+
namebuf, pid, exitstatus);
29652966

29662967
return true;
29672968
}
@@ -5417,7 +5418,7 @@ do_start_bgworker(RegisteredBgWorker *rw)
54175418
{
54185419
pid_t worker_pid;
54195420

5420-
ereport(LOG,
5421+
ereport(DEBUG1,
54215422
(errmsg("starting background worker process \"%s\"",
54225423
rw->rw_worker.bgw_name)));
54235424

0 commit comments

Comments
 (0)