Fix compiler warning about format on Windows

On 64-bit Windows, pid_t is long long int, so a %d format isn't
enough.
This commit is contained in:
Peter Eisentraut 2020-01-14 23:59:18 +01:00
parent 0e936a2148
commit fe233366f2
1 changed files with 2 additions and 1 deletions

View File

@ -366,7 +366,8 @@ WalReceiverMain(void)
if (wal_receiver_create_temp_slot)
{
snprintf(slotname, sizeof(slotname),
"pg_walreceiver_%d", walrcv_get_backend_pid(wrconn));
"pg_walreceiver_%lld",
(long long int) walrcv_get_backend_pid(wrconn));
walrcv_create_slot(wrconn, slotname, true, 0, NULL);
changed = true;