]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Use correct format placeholder for pids
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 19 Apr 2021 08:43:18 +0000 (10:43 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 19 Apr 2021 08:43:18 +0000 (10:43 +0200)
Should be signed, not unsigned.

src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgworker.c
src/backend/replication/logical/snapbuild.c

index a799544738e5b2c25c06de7893700cc6491d44a3..83c584ddc8cd4b7687171b116c293d5406445519 100644 (file)
@@ -1860,7 +1860,7 @@ autovac_balance_cost(void)
                }
 
                if (worker->wi_proc != NULL)
-                       elog(DEBUG2, "autovac_balance_cost(pid=%u db=%u, rel=%u, dobalance=%s cost_limit=%d, cost_limit_base=%d, cost_delay=%g)",
+                       elog(DEBUG2, "autovac_balance_cost(pid=%d db=%u, rel=%u, dobalance=%s cost_limit=%d, cost_limit_base=%d, cost_delay=%g)",
                                 worker->wi_proc->pid, worker->wi_dboid, worker->wi_tableoid,
                                 worker->wi_dobalance ? "yes" : "no",
                                 worker->wi_cost_limit, worker->wi_cost_limit_base,
index bbbc09b0b5c152b750abdd1ad32162c7e393a22b..11fc1b786379fcf6733867727a177c0fbe924467 100644 (file)
@@ -387,7 +387,7 @@ BackgroundWorkerStateChange(bool allow_new_workers)
                rw->rw_worker.bgw_notify_pid = slot->worker.bgw_notify_pid;
                if (!PostmasterMarkPIDForWorkerNotify(rw->rw_worker.bgw_notify_pid))
                {
-                       elog(DEBUG1, "worker notification PID %lu is not valid",
+                       elog(DEBUG1, "worker notification PID %ld is not valid",
                                 (long) rw->rw_worker.bgw_notify_pid);
                        rw->rw_worker.bgw_notify_pid = 0;
                }
index c5a812511959fb155e6b035ef6a81e88d2092701..9118e214220ab243bc5592b391af8b5f6ce1b4af 100644 (file)
@@ -1541,7 +1541,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
        elog(DEBUG1, "serializing snapshot to %s", path);
 
        /* to make sure only we will write to this tempfile, include pid */
-       sprintf(tmppath, "pg_logical/snapshots/%X-%X.snap.%u.tmp",
+       sprintf(tmppath, "pg_logical/snapshots/%X-%X.snap.%d.tmp",
                        LSN_FORMAT_ARGS(lsn), MyProcPid);
 
        /*