mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Standardize format for printing PIDs
Most code prints PIDs as %d, but some code tried to print them as long or unsigned long. While this is in theory allowed, the fact that PIDs fit into int is deeply baked into all PostgreSQL code, so these random deviations don't accomplish anything except confusion. Note that we still need casts from pid_t to int, because on 64-bit MinGW, pid_t is long long int. (But per above, actually supporting that range in PostgreSQL code would be major surgery and probably not useful.) Discussion: https://www.postgresql.org/message-id/289c2e45-c7d9-5ce4-7eff-a9e2a33e1580@enterprisedb.com
This commit is contained in:
@@ -416,8 +416,8 @@ WaitForProcSignalBarrier(uint64 generation)
|
||||
5000,
|
||||
WAIT_EVENT_PROC_SIGNAL_BARRIER))
|
||||
ereport(LOG,
|
||||
(errmsg("still waiting for backend with PID %lu to accept ProcSignalBarrier",
|
||||
(unsigned long) slot->pss_pid)));
|
||||
(errmsg("still waiting for backend with PID %d to accept ProcSignalBarrier",
|
||||
(int) slot->pss_pid)));
|
||||
oldval = pg_atomic_read_u64(&slot->pss_barrierGeneration);
|
||||
}
|
||||
ConditionVariableCancelSleep();
|
||||
|
Reference in New Issue
Block a user