From dddc34408aa6ca535e89cb26653014bb019bc263 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Mon, 4 Nov 2013 11:22:03 -0500 Subject: [PATCH] Fix format code used to print dsm request sizes. Per report from Peter Eisentraut. --- src/backend/storage/ipc/dsm.c | 5 +++-- src/backend/storage/ipc/dsm_impl.c | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c index 4d7fb08ca0..9f9b91a0ca 100644 --- a/src/backend/storage/ipc/dsm.c +++ b/src/backend/storage/ipc/dsm.c @@ -192,8 +192,9 @@ dsm_postmaster_startup(void) } dsm_control = dsm_control_address; on_shmem_exit(dsm_postmaster_shutdown, 0); - elog(DEBUG2, "created dynamic shared memory control segment %u (" - UINT64_FORMAT " bytes)", dsm_control_handle, segsize); + elog(DEBUG2, + "created dynamic shared memory control segment %u (%lu bytes)", + dsm_control_handle, (unsigned long) segsize); dsm_write_state_file(dsm_control_handle); /* Initialize control segment. */ diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index 811ac0437c..c876a84719 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -329,8 +329,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not resize shared memory segment %s to " UINT64_FORMAT " bytes: %m", - name, request_size))); + errmsg("could not resize shared memory segment %s to %lu bytes: %m", + name, (unsigned long) request_size))); return false; } @@ -871,8 +871,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not resize shared memory segment %s to " UINT64_FORMAT " bytes: %m", - name, request_size))); + errmsg("could not resize shared memory segment %s to %lu bytes: %m", + name, (unsigned long) request_size))); return false; } else if (*mapped_size < request_size) @@ -919,8 +919,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not resize shared memory segment %s to " UINT64_FORMAT " bytes: %m", - name, request_size))); + errmsg("could not resize shared memory segment %s to %lu bytes: %m", + name, (unsigned long) request_size))); return false; } } -- 2.40.0