summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2020-01-14 22:59:18 +0000
committerPeter Eisentraut2020-01-14 22:59:18 +0000
commitfe233366f2e3ca44609c805ce0604c1e2122c3f9 (patch)
treeac95fd8b35007bb2c637a26e22377b303f903f03
parent0e936a2148472e6c364aee8c3e298dc16dc4240a (diff)
Fix compiler warning about format on Windows
On 64-bit Windows, pid_t is long long int, so a %d format isn't enough.
-rw-r--r--src/backend/replication/walreceiver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index b4641143339..a5e85d32f31 100644
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -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;